<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: menu   menuitem.js  (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
	<link rel="stylesheet" type="text/css" href="assets/api.css" />

    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
        <h3>Menu&nbsp; <span class="subtitle">2.8.0r4</span></h3>
        <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> 
            &gt; <a href="./module_menu.html" title="menu">menu</a>
                
                 &gt; menuitem.js (source view) 
        <form onsubmit="return false">
            <div id="propertysearch">
                Search: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
                </fieldset>
            </form>

                    <div id="srcout">
                        <style>
                            #doc3 .classopts { display:none; }
                        </style>
                        <div class="highlight" ><pre><span class="o">(</span><span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

<span class="c">/**</span>
<span class="c">* Creates an item for a menu.</span>
<span class="c">* </span>
<span class="c">* @param {String} p_oObject String specifying the text of the menu item.</span>
<span class="c">* @param {&lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-</span>
<span class="c">* one-html.html#ID-74680021&quot;&gt;HTMLLIElement&lt;/a&gt;} p_oObject Object specifying </span>
<span class="c">* the &lt;code&gt;&amp;#60;li&amp;#62;&lt;/code&gt; element of the menu item.</span>
<span class="c">* @param {&lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-</span>
<span class="c">* one-html.html#ID-38450247&quot;&gt;HTMLOptGroupElement&lt;/a&gt;} p_oObject Object </span>
<span class="c">* specifying the &lt;code&gt;&amp;#60;optgroup&amp;#62;&lt;/code&gt; element of the menu item.</span>
<span class="c">* @param {&lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-</span>
<span class="c">* one-html.html#ID-70901257&quot;&gt;HTMLOptionElement&lt;/a&gt;} p_oObject Object </span>
<span class="c">* specifying the &lt;code&gt;&amp;#60;option&amp;#62;&lt;/code&gt; element of the menu item.</span>
<span class="c">* @param {Object} p_oConfig Optional. Object literal specifying the </span>
<span class="c">* configuration for the menu item. See configuration class documentation </span>
<span class="c">* for more details.</span>
<span class="c">* @class MenuItem</span>
<span class="c">* @constructor</span>
<span class="c">*/</span>
<span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">MenuItem</span> <span class="o">=</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_oObject</span><span class="o">,</span> <span class="nx">p_oConfig</span><span class="o">)</span> <span class="o">{</span>

    <span class="k">if</span> <span class="o">(</span><span class="nx">p_oObject</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">p_oConfig</span><span class="o">)</span> <span class="o">{</span>
    
            <span class="k">this</span><span class="o">.</span><span class="nx">parent</span> <span class="o">=</span> <span class="nx">p_oConfig</span><span class="o">.</span><span class="nx">parent</span><span class="o">;</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">value</span> <span class="o">=</span> <span class="nx">p_oConfig</span><span class="o">.</span><span class="nx">value</span><span class="o">;</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">id</span> <span class="o">=</span> <span class="nx">p_oConfig</span><span class="o">.</span><span class="nx">id</span><span class="o">;</span>

        <span class="o">}</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">init</span><span class="o">(</span><span class="nx">p_oObject</span><span class="o">,</span> <span class="nx">p_oConfig</span><span class="o">);</span>

    <span class="o">}</span>

<span class="o">};</span>


<span class="k">var</span> <span class="nx">Dom</span> <span class="o">=</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">Dom</span><span class="o">,</span>
    <span class="nx">Module</span> <span class="o">=</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Module</span><span class="o">,</span>
    <span class="nx">Menu</span> <span class="o">=</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Menu</span><span class="o">,</span>
    <span class="nx">MenuItem</span> <span class="o">=</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">MenuItem</span><span class="o">,</span>
    <span class="nx">CustomEvent</span> <span class="o">=</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">CustomEvent</span><span class="o">,</span>
    <span class="nx">UA</span> <span class="o">=</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">env</span><span class="o">.</span><span class="nx">ua</span><span class="o">,</span>
    <span class="nx">Lang</span> <span class="o">=</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">lang</span><span class="o">,</span>

	<span class="c">// Private string constants</span>
<span class="c"></span>
	<span class="nx">_TEXT</span> <span class="o">=</span> <span class="s2">&quot;text&quot;</span><span class="o">,</span>
	<span class="nx">_HASH</span> <span class="o">=</span> <span class="s2">&quot;#&quot;</span><span class="o">,</span>
	<span class="nx">_HYPHEN</span> <span class="o">=</span> <span class="s2">&quot;-&quot;</span><span class="o">,</span>
	<span class="nx">_HELP_TEXT</span> <span class="o">=</span> <span class="s2">&quot;helptext&quot;</span><span class="o">,</span>
	<span class="nx">_URL</span> <span class="o">=</span> <span class="s2">&quot;url&quot;</span><span class="o">,</span>
	<span class="nx">_TARGET</span> <span class="o">=</span> <span class="s2">&quot;target&quot;</span><span class="o">,</span>
	<span class="nx">_EMPHASIS</span> <span class="o">=</span> <span class="s2">&quot;emphasis&quot;</span><span class="o">,</span>
	<span class="nx">_STRONG_EMPHASIS</span> <span class="o">=</span> <span class="s2">&quot;strongemphasis&quot;</span><span class="o">,</span>
	<span class="nx">_CHECKED</span> <span class="o">=</span> <span class="s2">&quot;checked&quot;</span><span class="o">,</span>
	<span class="nx">_SUBMENU</span> <span class="o">=</span> <span class="s2">&quot;submenu&quot;</span><span class="o">,</span>
	<span class="nx">_DISABLED</span> <span class="o">=</span> <span class="s2">&quot;disabled&quot;</span><span class="o">,</span>
	<span class="nx">_SELECTED</span> <span class="o">=</span> <span class="s2">&quot;selected&quot;</span><span class="o">,</span>
	<span class="nx">_HAS_SUBMENU</span> <span class="o">=</span> <span class="s2">&quot;hassubmenu&quot;</span><span class="o">,</span>
	<span class="nx">_CHECKED_DISABLED</span> <span class="o">=</span> <span class="s2">&quot;checked-disabled&quot;</span><span class="o">,</span>
	<span class="nx">_HAS_SUBMENU_DISABLED</span> <span class="o">=</span> <span class="s2">&quot;hassubmenu-disabled&quot;</span><span class="o">,</span>
	<span class="nx">_HAS_SUBMENU_SELECTED</span> <span class="o">=</span> <span class="s2">&quot;hassubmenu-selected&quot;</span><span class="o">,</span>
	<span class="nx">_CHECKED_SELECTED</span> <span class="o">=</span> <span class="s2">&quot;checked-selected&quot;</span><span class="o">,</span>
	<span class="nx">_ONCLICK</span> <span class="o">=</span> <span class="s2">&quot;onclick&quot;</span><span class="o">,</span>
	<span class="nx">_CLASSNAME</span> <span class="o">=</span> <span class="s2">&quot;classname&quot;</span><span class="o">,</span>
	<span class="nx">_EMPTY_STRING</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span><span class="o">,</span>
	<span class="nx">_OPTION</span> <span class="o">=</span> <span class="s2">&quot;OPTION&quot;</span><span class="o">,</span>
	<span class="nx">_OPTGROUP</span> <span class="o">=</span> <span class="s2">&quot;OPTGROUP&quot;</span><span class="o">,</span>
	<span class="nx">_LI_UPPERCASE</span> <span class="o">=</span> <span class="s2">&quot;LI&quot;</span><span class="o">,</span>
	<span class="nx">_HREF</span> <span class="o">=</span> <span class="s2">&quot;href&quot;</span><span class="o">,</span>
	<span class="nx">_SELECT</span> <span class="o">=</span> <span class="s2">&quot;SELECT&quot;</span><span class="o">,</span>
	<span class="nx">_DIV</span> <span class="o">=</span> <span class="s2">&quot;DIV&quot;</span><span class="o">,</span>
	<span class="nx">_START_HELP_TEXT</span> <span class="o">=</span> <span class="s2">&quot;&lt;em class=\&quot;helptext\&quot;&gt;&quot;</span><span class="o">,</span>
	<span class="nx">_START_EM</span> <span class="o">=</span> <span class="s2">&quot;&lt;em&gt;&quot;</span><span class="o">,</span>
	<span class="nx">_END_EM</span> <span class="o">=</span> <span class="s2">&quot;&lt;/em&gt;&quot;</span><span class="o">,</span>
	<span class="nx">_START_STRONG</span> <span class="o">=</span> <span class="s2">&quot;&lt;strong&gt;&quot;</span><span class="o">,</span>
	<span class="nx">_END_STRONG</span> <span class="o">=</span> <span class="s2">&quot;&lt;/strong&gt;&quot;</span><span class="o">,</span>
	<span class="nx">_PREVENT_CONTEXT_OVERLAP</span> <span class="o">=</span> <span class="s2">&quot;preventcontextoverlap&quot;</span><span class="o">,</span>
	<span class="nx">_OBJ</span> <span class="o">=</span> <span class="s2">&quot;obj&quot;</span><span class="o">,</span>
	<span class="nx">_SCOPE</span> <span class="o">=</span> <span class="s2">&quot;scope&quot;</span><span class="o">,</span>
	<span class="nx">_NONE</span> <span class="o">=</span> <span class="s2">&quot;none&quot;</span><span class="o">,</span>
	<span class="nx">_VISIBLE</span> <span class="o">=</span> <span class="s2">&quot;visible&quot;</span><span class="o">,</span>
	<span class="nx">_SPACE</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span><span class="o">,</span>
	<span class="nx">_MENUITEM</span> <span class="o">=</span> <span class="s2">&quot;MenuItem&quot;</span><span class="o">,</span>
	<span class="nx">_CLICK</span> <span class="o">=</span> <span class="s2">&quot;click&quot;</span><span class="o">,</span>
	<span class="nx">_SHOW</span> <span class="o">=</span> <span class="s2">&quot;show&quot;</span><span class="o">,</span>
	<span class="nx">_HIDE</span> <span class="o">=</span> <span class="s2">&quot;hide&quot;</span><span class="o">,</span>
	<span class="nx">_LI_LOWERCASE</span> <span class="o">=</span> <span class="s2">&quot;li&quot;</span><span class="o">,</span>
	<span class="nx">_ANCHOR_TEMPLATE</span> <span class="o">=</span> <span class="s2">&quot;&lt;a href=\&quot;#\&quot;&gt;&lt;/a&gt;&quot;</span><span class="o">,</span>

    <span class="nx">EVENT_TYPES</span> <span class="o">=</span> <span class="o">[</span>
    
        <span class="o">[</span><span class="s2">&quot;mouseOverEvent&quot;</span><span class="o">,</span> <span class="s2">&quot;mouseover&quot;</span><span class="o">],</span>
        <span class="o">[</span><span class="s2">&quot;mouseOutEvent&quot;</span><span class="o">,</span> <span class="s2">&quot;mouseout&quot;</span><span class="o">],</span>
        <span class="o">[</span><span class="s2">&quot;mouseDownEvent&quot;</span><span class="o">,</span> <span class="s2">&quot;mousedown&quot;</span><span class="o">],</span>
        <span class="o">[</span><span class="s2">&quot;mouseUpEvent&quot;</span><span class="o">,</span> <span class="s2">&quot;mouseup&quot;</span><span class="o">],</span>
        <span class="o">[</span><span class="s2">&quot;clickEvent&quot;</span><span class="o">,</span> <span class="nx">_CLICK</span><span class="o">],</span>
        <span class="o">[</span><span class="s2">&quot;keyPressEvent&quot;</span><span class="o">,</span> <span class="s2">&quot;keypress&quot;</span><span class="o">],</span>
        <span class="o">[</span><span class="s2">&quot;keyDownEvent&quot;</span><span class="o">,</span> <span class="s2">&quot;keydown&quot;</span><span class="o">],</span>
        <span class="o">[</span><span class="s2">&quot;keyUpEvent&quot;</span><span class="o">,</span> <span class="s2">&quot;keyup&quot;</span><span class="o">],</span>
        <span class="o">[</span><span class="s2">&quot;focusEvent&quot;</span><span class="o">,</span> <span class="s2">&quot;focus&quot;</span><span class="o">],</span>
        <span class="o">[</span><span class="s2">&quot;blurEvent&quot;</span><span class="o">,</span> <span class="s2">&quot;blur&quot;</span><span class="o">],</span>
        <span class="o">[</span><span class="s2">&quot;destroyEvent&quot;</span><span class="o">,</span> <span class="s2">&quot;destroy&quot;</span><span class="o">]</span>
    
    <span class="o">],</span>

	<span class="nx">TEXT_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_TEXT</span><span class="o">,</span> 
		<span class="nx">value</span><span class="o">:</span> <span class="nx">_EMPTY_STRING</span><span class="o">,</span> 
		<span class="nx">validator</span><span class="o">:</span> <span class="nx">Lang</span><span class="o">.</span><span class="nx">isString</span><span class="o">,</span> 
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span> 
	<span class="o">},</span> 

	<span class="nx">HELP_TEXT_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_HELP_TEXT</span><span class="o">,</span>
		<span class="nx">supercedes</span><span class="o">:</span> <span class="o">[</span><span class="nx">_TEXT</span><span class="o">],</span> 
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span> 
	<span class="o">},</span>

	<span class="nx">URL_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_URL</span><span class="o">,</span> 
		<span class="nx">value</span><span class="o">:</span> <span class="nx">_HASH</span><span class="o">,</span> 
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span> 
	<span class="o">},</span> 

	<span class="nx">TARGET_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_TARGET</span><span class="o">,</span> 
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span> 
	<span class="o">},</span> 

	<span class="nx">EMPHASIS_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_EMPHASIS</span><span class="o">,</span> 
		<span class="nx">value</span><span class="o">:</span> <span class="kc">false</span><span class="o">,</span> 
		<span class="nx">validator</span><span class="o">:</span> <span class="nx">Lang</span><span class="o">.</span><span class="nx">isBoolean</span><span class="o">,</span> 
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span><span class="o">,</span> 
		<span class="nx">supercedes</span><span class="o">:</span> <span class="o">[</span><span class="nx">_TEXT</span><span class="o">]</span>
	<span class="o">},</span> 

	<span class="nx">STRONG_EMPHASIS_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_STRONG_EMPHASIS</span><span class="o">,</span> 
		<span class="nx">value</span><span class="o">:</span> <span class="kc">false</span><span class="o">,</span> 
		<span class="nx">validator</span><span class="o">:</span> <span class="nx">Lang</span><span class="o">.</span><span class="nx">isBoolean</span><span class="o">,</span> 
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span><span class="o">,</span>
		<span class="nx">supercedes</span><span class="o">:</span> <span class="o">[</span><span class="nx">_TEXT</span><span class="o">]</span>
	<span class="o">},</span>

	<span class="nx">CHECKED_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_CHECKED</span><span class="o">,</span> 
		<span class="nx">value</span><span class="o">:</span> <span class="kc">false</span><span class="o">,</span> 
		<span class="nx">validator</span><span class="o">:</span> <span class="nx">Lang</span><span class="o">.</span><span class="nx">isBoolean</span><span class="o">,</span> 
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span><span class="o">,</span> 
		<span class="nx">supercedes</span><span class="o">:</span> <span class="o">[</span><span class="nx">_DISABLED</span><span class="o">,</span> <span class="nx">_SELECTED</span><span class="o">]</span>
	<span class="o">},</span> 

	<span class="nx">SUBMENU_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_SUBMENU</span><span class="o">,</span>
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span><span class="o">,</span>
		<span class="nx">supercedes</span><span class="o">:</span> <span class="o">[</span><span class="nx">_DISABLED</span><span class="o">,</span> <span class="nx">_SELECTED</span><span class="o">]</span>
	<span class="o">},</span>

	<span class="nx">DISABLED_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_DISABLED</span><span class="o">,</span> 
		<span class="nx">value</span><span class="o">:</span> <span class="kc">false</span><span class="o">,</span> 
		<span class="nx">validator</span><span class="o">:</span> <span class="nx">Lang</span><span class="o">.</span><span class="nx">isBoolean</span><span class="o">,</span> 
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span><span class="o">,</span>
		<span class="nx">supercedes</span><span class="o">:</span> <span class="o">[</span><span class="nx">_TEXT</span><span class="o">,</span> <span class="nx">_SELECTED</span><span class="o">]</span>
	<span class="o">},</span>

	<span class="nx">SELECTED_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_SELECTED</span><span class="o">,</span> 
		<span class="nx">value</span><span class="o">:</span> <span class="kc">false</span><span class="o">,</span> 
		<span class="nx">validator</span><span class="o">:</span> <span class="nx">Lang</span><span class="o">.</span><span class="nx">isBoolean</span><span class="o">,</span> 
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span>
	<span class="o">},</span>

	<span class="nx">ONCLICK_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_ONCLICK</span><span class="o">,</span>
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span>
	<span class="o">},</span>

	<span class="nx">CLASS_NAME_CONFIG</span> <span class="o">=</span> <span class="o">{</span> 
		<span class="nx">key</span><span class="o">:</span> <span class="nx">_CLASSNAME</span><span class="o">,</span> 
		<span class="nx">value</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span> 
		<span class="nx">validator</span><span class="o">:</span> <span class="nx">Lang</span><span class="o">.</span><span class="nx">isString</span><span class="o">,</span>
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span>
	<span class="o">},</span>
    
	<span class="nx">KEY_LISTENER_CONFIG</span> <span class="o">=</span> <span class="o">{</span>
		<span class="nx">key</span><span class="o">:</span> <span class="s2">&quot;keylistener&quot;</span><span class="o">,</span> 
		<span class="nx">value</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span> 
		<span class="nx">suppressEvent</span><span class="o">:</span> <span class="kc">true</span>
	<span class="o">},</span>

	<span class="nx">m_oMenuItemTemplate</span> <span class="o">=</span> <span class="kc">null</span><span class="o">,</span>

    <span class="nx">CLASS_NAMES</span> <span class="o">=</span> <span class="o">{};</span>


<span class="c">/**</span>
<span class="c">* @method getClassNameForState</span>
<span class="c">* @description Returns a class name for the specified prefix and state.  If the class name does not </span>
<span class="c">* yet exist, it is created and stored in the CLASS_NAMES object to increase performance.</span>
<span class="c">* @private</span>
<span class="c">* @param {String} prefix String representing the prefix for the class name</span>
<span class="c">* @param {String} state String representing a state - &quot;disabled,&quot; &quot;checked,&quot; etc.</span>
<span class="c">*/</span>  
<span class="k">var</span> <span class="nx">getClassNameForState</span> <span class="o">=</span> <span class="k">function</span> <span class="o">(</span><span class="nx">prefix</span><span class="o">,</span> <span class="nx">state</span><span class="o">)</span> <span class="o">{</span>

	<span class="k">var</span> <span class="nx">oClassNames</span> <span class="o">=</span> <span class="nx">CLASS_NAMES</span><span class="o">[</span><span class="nx">prefix</span><span class="o">];</span>
	
	<span class="k">if</span> <span class="o">(!</span><span class="nx">oClassNames</span><span class="o">)</span> <span class="o">{</span>
		<span class="nx">CLASS_NAMES</span><span class="o">[</span><span class="nx">prefix</span><span class="o">]</span> <span class="o">=</span> <span class="o">{};</span>
		<span class="nx">oClassNames</span> <span class="o">=</span> <span class="nx">CLASS_NAMES</span><span class="o">[</span><span class="nx">prefix</span><span class="o">];</span>
	<span class="o">}</span>


	<span class="k">var</span> <span class="nx">sClassName</span> <span class="o">=</span> <span class="nx">oClassNames</span><span class="o">[</span><span class="nx">state</span><span class="o">];</span>

	<span class="k">if</span> <span class="o">(!</span><span class="nx">sClassName</span><span class="o">)</span> <span class="o">{</span>
		<span class="nx">sClassName</span> <span class="o">=</span> <span class="nx">prefix</span> <span class="o">+</span> <span class="nx">_HYPHEN</span> <span class="o">+</span> <span class="nx">state</span><span class="o">;</span>
		<span class="nx">oClassNames</span><span class="o">[</span><span class="nx">state</span><span class="o">]</span> <span class="o">=</span> <span class="nx">sClassName</span><span class="o">;</span>
	<span class="o">}</span>

	<span class="k">return</span> <span class="nx">sClassName</span><span class="o">;</span>
	
<span class="o">};</span>


<span class="c">/**</span>
<span class="c">* @method addClassNameForState</span>
<span class="c">* @description Applies a class name to a MenuItem instance&#39;s &amp;#60;LI&amp;#62; and &amp;#60;A&amp;#62; elements</span>
<span class="c">* that represents a MenuItem&#39;s state - &quot;disabled,&quot; &quot;checked,&quot; etc.</span>
<span class="c">* @private</span>
<span class="c">* @param {String} state String representing a state - &quot;disabled,&quot; &quot;checked,&quot; etc.</span>
<span class="c">*/</span>  
<span class="k">var</span> <span class="nx">addClassNameForState</span> <span class="o">=</span> <span class="k">function</span> <span class="o">(</span><span class="nx">state</span><span class="o">)</span> <span class="o">{</span>

	<span class="nx">Dom</span><span class="o">.</span><span class="nx">addClass</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">,</span> <span class="nx">getClassNameForState</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">CSS_CLASS_NAME</span><span class="o">,</span> <span class="nx">state</span><span class="o">));</span>
	<span class="nx">Dom</span><span class="o">.</span><span class="nx">addClass</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span><span class="o">,</span> <span class="nx">getClassNameForState</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">CSS_LABEL_CLASS_NAME</span><span class="o">,</span> <span class="nx">state</span><span class="o">));</span>

<span class="o">};</span>

<span class="c">/**</span>
<span class="c">* @method removeClassNameForState</span>
<span class="c">* @description Removes a class name from a MenuItem instance&#39;s &amp;#60;LI&amp;#62; and &amp;#60;A&amp;#62; elements</span>
<span class="c">* that represents a MenuItem&#39;s state - &quot;disabled,&quot; &quot;checked,&quot; etc.</span>
<span class="c">* @private</span>
<span class="c">* @param {String} state String representing a state - &quot;disabled,&quot; &quot;checked,&quot; etc.</span>
<span class="c">*/</span>  
<span class="k">var</span> <span class="nx">removeClassNameForState</span> <span class="o">=</span> <span class="k">function</span> <span class="o">(</span><span class="nx">state</span><span class="o">)</span> <span class="o">{</span>

	<span class="nx">Dom</span><span class="o">.</span><span class="nx">removeClass</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">,</span> <span class="nx">getClassNameForState</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">CSS_CLASS_NAME</span><span class="o">,</span> <span class="nx">state</span><span class="o">));</span>
	<span class="nx">Dom</span><span class="o">.</span><span class="nx">removeClass</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span><span class="o">,</span> <span class="nx">getClassNameForState</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">CSS_LABEL_CLASS_NAME</span><span class="o">,</span> <span class="nx">state</span><span class="o">));</span>

<span class="o">};</span>


<span class="nx">MenuItem</span><span class="o">.</span><span class="nx">prototype</span> <span class="o">=</span> <span class="o">{</span>

    <span class="c">/**</span>
<span class="c">    * @property CSS_CLASS_NAME</span>
<span class="c">    * @description String representing the CSS class(es) to be applied to the </span>
<span class="c">    * &lt;code&gt;&amp;#60;li&amp;#62;&lt;/code&gt; element of the menu item.</span>
<span class="c">    * @default &quot;yuimenuitem&quot;</span>
<span class="c">    * @final</span>
<span class="c">    * @type String</span>
<span class="c">    */</span>
    <span class="nx">CSS_CLASS_NAME</span><span class="o">:</span> <span class="s2">&quot;yuimenuitem&quot;</span><span class="o">,</span>


    <span class="c">/**</span>
<span class="c">    * @property CSS_LABEL_CLASS_NAME</span>
<span class="c">    * @description String representing the CSS class(es) to be applied to the </span>
<span class="c">    * menu item&#39;s &lt;code&gt;&amp;#60;a&amp;#62;&lt;/code&gt; element.</span>
<span class="c">    * @default &quot;yuimenuitemlabel&quot;</span>
<span class="c">    * @final</span>
<span class="c">    * @type String</span>
<span class="c">    */</span>
    <span class="nx">CSS_LABEL_CLASS_NAME</span><span class="o">:</span> <span class="s2">&quot;yuimenuitemlabel&quot;</span><span class="o">,</span>


    <span class="c">/**</span>
<span class="c">    * @property SUBMENU_TYPE</span>
<span class="c">    * @description Object representing the type of menu to instantiate and </span>
<span class="c">    * add when parsing the child nodes of the menu item&#39;s source HTML element.</span>
<span class="c">    * @final</span>
<span class="c">    * @type YAHOO.widget.Menu</span>
<span class="c">    */</span>
    <span class="nx">SUBMENU_TYPE</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>



    <span class="c">// Private member variables</span>
<span class="c"></span>    

    <span class="c">/**</span>
<span class="c">    * @property _oAnchor</span>
<span class="c">    * @description Object reference to the menu item&#39;s </span>
<span class="c">    * &lt;code&gt;&amp;#60;a&amp;#62;&lt;/code&gt; element.</span>
<span class="c">    * @default null </span>
<span class="c">    * @private</span>
<span class="c">    * @type &lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-</span>
<span class="c">    * one-html.html#ID-48250443&quot;&gt;HTMLAnchorElement&lt;/a&gt;</span>
<span class="c">    */</span>
    <span class="nx">_oAnchor</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>
    
    
    <span class="c">/**</span>
<span class="c">    * @property _oHelpTextEM</span>
<span class="c">    * @description Object reference to the menu item&#39;s help text </span>
<span class="c">    * &lt;code&gt;&amp;#60;em&amp;#62;&lt;/code&gt; element.</span>
<span class="c">    * @default null</span>
<span class="c">    * @private</span>
<span class="c">    * @type &lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-</span>
<span class="c">    * one-html.html#ID-58190037&quot;&gt;HTMLElement&lt;/a&gt;</span>
<span class="c">    */</span>
    <span class="nx">_oHelpTextEM</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>
    
    
    <span class="c">/**</span>
<span class="c">    * @property _oSubmenu</span>
<span class="c">    * @description Object reference to the menu item&#39;s submenu.</span>
<span class="c">    * @default null</span>
<span class="c">    * @private</span>
<span class="c">    * @type YAHOO.widget.Menu</span>
<span class="c">    */</span>
    <span class="nx">_oSubmenu</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>


    <span class="c">/** </span>
<span class="c">    * @property _oOnclickAttributeValue</span>
<span class="c">    * @description Object reference to the menu item&#39;s current value for the </span>
<span class="c">    * &quot;onclick&quot; configuration attribute.</span>
<span class="c">    * @default null</span>
<span class="c">    * @private</span>
<span class="c">    * @type Object</span>
<span class="c">    */</span>
    <span class="nx">_oOnclickAttributeValue</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>


    <span class="c">/**</span>
<span class="c">    * @property _sClassName</span>
<span class="c">    * @description The current value of the &quot;classname&quot; configuration attribute.</span>
<span class="c">    * @default null</span>
<span class="c">    * @private</span>
<span class="c">    * @type String</span>
<span class="c">    */</span>
    <span class="nx">_sClassName</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>



    <span class="c">// Public properties</span>
<span class="c"></span>

	<span class="c">/**</span>
<span class="c">    * @property constructor</span>
<span class="c">	* @description Object reference to the menu item&#39;s constructor function.</span>
<span class="c">    * @default YAHOO.widget.MenuItem</span>
<span class="c">	* @type YAHOO.widget.MenuItem</span>
<span class="c">	*/</span>
	<span class="nx">constructor</span><span class="o">:</span> <span class="nx">MenuItem</span><span class="o">,</span>


    <span class="c">/**</span>
<span class="c">    * @property index</span>
<span class="c">    * @description Number indicating the ordinal position of the menu item in </span>
<span class="c">    * its group.</span>
<span class="c">    * @default null</span>
<span class="c">    * @type Number</span>
<span class="c">    */</span>
    <span class="nx">index</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>


    <span class="c">/**</span>
<span class="c">    * @property groupIndex</span>
<span class="c">    * @description Number indicating the index of the group to which the menu </span>
<span class="c">    * item belongs.</span>
<span class="c">    * @default null</span>
<span class="c">    * @type Number</span>
<span class="c">    */</span>
    <span class="nx">groupIndex</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>


    <span class="c">/**</span>
<span class="c">    * @property parent</span>
<span class="c">    * @description Object reference to the menu item&#39;s parent menu.</span>
<span class="c">    * @default null</span>
<span class="c">    * @type YAHOO.widget.Menu</span>
<span class="c">    */</span>
    <span class="nx">parent</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>


    <span class="c">/**</span>
<span class="c">    * @property element</span>
<span class="c">    * @description Object reference to the menu item&#39;s </span>
<span class="c">    * &lt;code&gt;&amp;#60;li&amp;#62;&lt;/code&gt; element.</span>
<span class="c">    * @default &lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level</span>
<span class="c">    * -one-html.html#ID-74680021&quot;&gt;HTMLLIElement&lt;/a&gt;</span>
<span class="c">    * @type &lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-</span>
<span class="c">    * one-html.html#ID-74680021&quot;&gt;HTMLLIElement&lt;/a&gt;</span>
<span class="c">    */</span>
    <span class="nx">element</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>


    <span class="c">/**</span>
<span class="c">    * @property srcElement</span>
<span class="c">    * @description Object reference to the HTML element (either </span>
<span class="c">    * &lt;code&gt;&amp;#60;li&amp;#62;&lt;/code&gt;, &lt;code&gt;&amp;#60;optgroup&amp;#62;&lt;/code&gt; or </span>
<span class="c">    * &lt;code&gt;&amp;#60;option&amp;#62;&lt;/code&gt;) used create the menu item.</span>
<span class="c">    * @default &lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/</span>
<span class="c">    * level-one-html.html#ID-74680021&quot;&gt;HTMLLIElement&lt;/a&gt;|&lt;a href=&quot;http://www.</span>
<span class="c">    * w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-38450247&quot;</span>
<span class="c">    * &gt;HTMLOptGroupElement&lt;/a&gt;|&lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-</span>
<span class="c">    * Level-1-20000929/level-one-html.html#ID-70901257&quot;&gt;HTMLOptionElement&lt;/a&gt;</span>
<span class="c">    * @type &lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-</span>
<span class="c">    * one-html.html#ID-74680021&quot;&gt;HTMLLIElement&lt;/a&gt;|&lt;a href=&quot;http://www.w3.</span>
<span class="c">    * org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-38450247&quot;&gt;</span>
<span class="c">    * HTMLOptGroupElement&lt;/a&gt;|&lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-</span>
<span class="c">    * Level-1-20000929/level-one-html.html#ID-70901257&quot;&gt;HTMLOptionElement&lt;/a&gt;</span>
<span class="c">    */</span>
    <span class="nx">srcElement</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>


    <span class="c">/**</span>
<span class="c">    * @property value</span>
<span class="c">    * @description Object reference to the menu item&#39;s value.</span>
<span class="c">    * @default null</span>
<span class="c">    * @type Object</span>
<span class="c">    */</span>
    <span class="nx">value</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>


	<span class="c">/**</span>
<span class="c">    * @property browser</span>
<span class="c">    * @deprecated Use YAHOO.env.ua</span>
<span class="c">	* @description String representing the browser.</span>
<span class="c">	* @type String</span>
<span class="c">	*/</span>
	<span class="nx">browser</span><span class="o">:</span> <span class="nx">Module</span><span class="o">.</span><span class="nx">prototype</span><span class="o">.</span><span class="nx">browser</span><span class="o">,</span>


    <span class="c">/**</span>
<span class="c">    * @property id</span>
<span class="c">    * @description Id of the menu item&#39;s root &lt;code&gt;&amp;#60;li&amp;#62;&lt;/code&gt; </span>
<span class="c">    * element.  This property should be set via the constructor using the </span>
<span class="c">    * configuration object literal.  If an id is not specified, then one will </span>
<span class="c">    * be created using the &quot;generateId&quot; method of the Dom utility.</span>
<span class="c">    * @default null</span>
<span class="c">    * @type String</span>
<span class="c">    */</span>
    <span class="nx">id</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>



    <span class="c">// Events</span>
<span class="c"></span>

    <span class="c">/**</span>
<span class="c">    * @event destroyEvent</span>
<span class="c">    * @description Fires when the menu item&#39;s &lt;code&gt;&amp;#60;li&amp;#62;&lt;/code&gt; </span>
<span class="c">    * element is removed from its parent &lt;code&gt;&amp;#60;ul&amp;#62;&lt;/code&gt; element.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @event mouseOverEvent</span>
<span class="c">    * @description Fires when the mouse has entered the menu item.  Passes </span>
<span class="c">    * back the DOM Event object as an argument.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @event mouseOutEvent</span>
<span class="c">    * @description Fires when the mouse has left the menu item.  Passes back </span>
<span class="c">    * the DOM Event object as an argument.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @event mouseDownEvent</span>
<span class="c">    * @description Fires when the user mouses down on the menu item.  Passes </span>
<span class="c">    * back the DOM Event object as an argument.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @event mouseUpEvent</span>
<span class="c">    * @description Fires when the user releases a mouse button while the mouse </span>
<span class="c">    * is over the menu item.  Passes back the DOM Event object as an argument.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @event clickEvent</span>
<span class="c">    * @description Fires when the user clicks the on the menu item.  Passes </span>
<span class="c">    * back the DOM Event object as an argument.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @event keyPressEvent</span>
<span class="c">    * @description Fires when the user presses an alphanumeric key when the </span>
<span class="c">    * menu item has focus.  Passes back the DOM Event object as an argument.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @event keyDownEvent</span>
<span class="c">    * @description Fires when the user presses a key when the menu item has </span>
<span class="c">    * focus.  Passes back the DOM Event object as an argument.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @event keyUpEvent</span>
<span class="c">    * @description Fires when the user releases a key when the menu item has </span>
<span class="c">    * focus.  Passes back the DOM Event object as an argument.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @event focusEvent</span>
<span class="c">    * @description Fires when the menu item receives focus.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @event blurEvent</span>
<span class="c">    * @description Fires when the menu item loses the input focus.</span>
<span class="c">    * @type YAHOO.util.CustomEvent</span>
<span class="c">    */</span>


    <span class="c">/**</span>
<span class="c">    * @method init</span>
<span class="c">    * @description The MenuItem class&#39;s initialization method. This method is </span>
<span class="c">    * automatically called by the constructor, and sets up all DOM references </span>
<span class="c">    * for pre-existing markup, and creates required markup if it is not </span>
<span class="c">    * already present.</span>
<span class="c">    * @param {String} p_oObject String specifying the text of the menu item.</span>
<span class="c">    * @param {&lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-</span>
<span class="c">    * one-html.html#ID-74680021&quot;&gt;HTMLLIElement&lt;/a&gt;} p_oObject Object specifying </span>
<span class="c">    * the &lt;code&gt;&amp;#60;li&amp;#62;&lt;/code&gt; element of the menu item.</span>
<span class="c">    * @param {&lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-</span>
<span class="c">    * one-html.html#ID-38450247&quot;&gt;HTMLOptGroupElement&lt;/a&gt;} p_oObject Object </span>
<span class="c">    * specifying the &lt;code&gt;&amp;#60;optgroup&amp;#62;&lt;/code&gt; element of the menu item.</span>
<span class="c">    * @param {&lt;a href=&quot;http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-</span>
<span class="c">    * one-html.html#ID-70901257&quot;&gt;HTMLOptionElement&lt;/a&gt;} p_oObject Object </span>
<span class="c">    * specifying the &lt;code&gt;&amp;#60;option&amp;#62;&lt;/code&gt; element of the menu item.</span>
<span class="c">    * @param {Object} p_oConfig Optional. Object literal specifying the </span>
<span class="c">    * configuration for the menu item. See configuration class documentation </span>
<span class="c">    * for more details.</span>
<span class="c">    */</span>
    <span class="nx">init</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_oObject</span><span class="o">,</span> <span class="nx">p_oConfig</span><span class="o">)</span> <span class="o">{</span>


        <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">SUBMENU_TYPE</span><span class="o">)</span> <span class="o">{</span>
    
            <span class="k">this</span><span class="o">.</span><span class="nx">SUBMENU_TYPE</span> <span class="o">=</span> <span class="nx">Menu</span><span class="o">;</span>
    
        <span class="o">}</span>


        <span class="c">// Create the config object</span>
<span class="c"></span>
        <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">Config</span><span class="o">(</span><span class="k">this</span><span class="o">);</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">initDefaultConfig</span><span class="o">();</span>

        <span class="k">var</span> <span class="nx">oConfig</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">,</span>
            <span class="nx">sURL</span> <span class="o">=</span> <span class="nx">_HASH</span><span class="o">,</span>
            <span class="nx">oCustomEvent</span><span class="o">,</span>
			<span class="nx">aEventData</span><span class="o">,</span>
            <span class="nx">oAnchor</span><span class="o">,</span>
            <span class="nx">sTarget</span><span class="o">,</span>
            <span class="nx">sText</span><span class="o">,</span>
            <span class="nx">sId</span><span class="o">,</span>
            <span class="nx">i</span><span class="o">;</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">Lang</span><span class="o">.</span><span class="nx">isString</span><span class="o">(</span><span class="nx">p_oObject</span><span class="o">))</span> <span class="o">{</span>

            <span class="k">this</span><span class="o">.</span><span class="nx">_createRootNodeStructure</span><span class="o">();</span>

            <span class="nx">oConfig</span><span class="o">.</span><span class="nx">queueProperty</span><span class="o">(</span><span class="nx">_TEXT</span><span class="o">,</span> <span class="nx">p_oObject</span><span class="o">);</span>

        <span class="o">}</span>
        <span class="k">else</span> <span class="k">if</span> <span class="o">(</span><span class="nx">p_oObject</span> <span class="o">&amp;&amp;</span> <span class="nx">p_oObject</span><span class="o">.</span><span class="nx">tagName</span><span class="o">)</span> <span class="o">{</span>

            <span class="nx">switch</span><span class="o">(</span><span class="nx">p_oObject</span><span class="o">.</span><span class="nx">tagName</span><span class="o">.</span><span class="nx">toUpperCase</span><span class="o">())</span> <span class="o">{</span>

                <span class="nx">case</span> <span class="nx">_OPTION</span><span class="o">:</span>

                    <span class="k">this</span><span class="o">.</span><span class="nx">_createRootNodeStructure</span><span class="o">();</span>

                    <span class="nx">oConfig</span><span class="o">.</span><span class="nx">queueProperty</span><span class="o">(</span><span class="nx">_TEXT</span><span class="o">,</span> <span class="nx">p_oObject</span><span class="o">.</span><span class="nx">text</span><span class="o">);</span>
                    <span class="nx">oConfig</span><span class="o">.</span><span class="nx">queueProperty</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">,</span> <span class="nx">p_oObject</span><span class="o">.</span><span class="nx">disabled</span><span class="o">);</span>

                    <span class="k">this</span><span class="o">.</span><span class="nx">value</span> <span class="o">=</span> <span class="nx">p_oObject</span><span class="o">.</span><span class="nx">value</span><span class="o">;</span>

                    <span class="k">this</span><span class="o">.</span><span class="nx">srcElement</span> <span class="o">=</span> <span class="nx">p_oObject</span><span class="o">;</span>

                <span class="k">break</span><span class="o">;</span>

                <span class="nx">case</span> <span class="nx">_OPTGROUP</span><span class="o">:</span>

                    <span class="k">this</span><span class="o">.</span><span class="nx">_createRootNodeStructure</span><span class="o">();</span>

                    <span class="nx">oConfig</span><span class="o">.</span><span class="nx">queueProperty</span><span class="o">(</span><span class="nx">_TEXT</span><span class="o">,</span> <span class="nx">p_oObject</span><span class="o">.</span><span class="k">label</span><span class="o">);</span>
                    <span class="nx">oConfig</span><span class="o">.</span><span class="nx">queueProperty</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">,</span> <span class="nx">p_oObject</span><span class="o">.</span><span class="nx">disabled</span><span class="o">);</span>

                    <span class="k">this</span><span class="o">.</span><span class="nx">srcElement</span> <span class="o">=</span> <span class="nx">p_oObject</span><span class="o">;</span>

                    <span class="k">this</span><span class="o">.</span><span class="nx">_initSubTree</span><span class="o">();</span>

                <span class="k">break</span><span class="o">;</span>

                <span class="nx">case</span> <span class="nx">_LI_UPPERCASE</span><span class="o">:</span>

                    <span class="c">// Get the anchor node (if it exists)</span>
<span class="c"></span>                    
                    <span class="nx">oAnchor</span> <span class="o">=</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">getFirstChild</span><span class="o">(</span><span class="nx">p_oObject</span><span class="o">);</span>


                    <span class="c">// Capture the &quot;text&quot; and/or the &quot;URL&quot;</span>
<span class="c"></span>
                    <span class="k">if</span> <span class="o">(</span><span class="nx">oAnchor</span><span class="o">)</span> <span class="o">{</span>

                        <span class="nx">sURL</span> <span class="o">=</span> <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">getAttribute</span><span class="o">(</span><span class="nx">_HREF</span><span class="o">,</span> <span class="m">2</span><span class="o">);</span>
                        <span class="nx">sTarget</span> <span class="o">=</span> <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">getAttribute</span><span class="o">(</span><span class="nx">_TARGET</span><span class="o">);</span>

                        <span class="nx">sText</span> <span class="o">=</span> <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">innerHTML</span><span class="o">;</span>

                    <span class="o">}</span>

                    <span class="k">this</span><span class="o">.</span><span class="nx">srcElement</span> <span class="o">=</span> <span class="nx">p_oObject</span><span class="o">;</span>
                    <span class="k">this</span><span class="o">.</span><span class="nx">element</span> <span class="o">=</span> <span class="nx">p_oObject</span><span class="o">;</span>
                    <span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span> <span class="o">=</span> <span class="nx">oAnchor</span><span class="o">;</span>

                    <span class="c">/*</span>
<span class="c">                        Set these properties silently to sync up the </span>
<span class="c">                        configuration object without making changes to the </span>
<span class="c">                        element&#39;s DOM</span>
<span class="c">                    */</span> 

                    <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_TEXT</span><span class="o">,</span> <span class="nx">sText</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>
                    <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_URL</span><span class="o">,</span> <span class="nx">sURL</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>
                    <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_TARGET</span><span class="o">,</span> <span class="nx">sTarget</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>

                    <span class="k">this</span><span class="o">.</span><span class="nx">_initSubTree</span><span class="o">();</span>

                <span class="k">break</span><span class="o">;</span>

            <span class="o">}</span>            

        <span class="o">}</span>


        <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">)</span> <span class="o">{</span>

            <span class="nx">sId</span> <span class="o">=</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">srcElement</span> <span class="o">||</span> <span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">).</span><span class="nx">id</span><span class="o">;</span>

            <span class="k">if</span> <span class="o">(!</span><span class="nx">sId</span><span class="o">)</span> <span class="o">{</span>

                <span class="nx">sId</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">id</span> <span class="o">||</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">generateId</span><span class="o">();</span>

                <span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">.</span><span class="nx">id</span> <span class="o">=</span> <span class="nx">sId</span><span class="o">;</span>

            <span class="o">}</span>

            <span class="k">this</span><span class="o">.</span><span class="nx">id</span> <span class="o">=</span> <span class="nx">sId</span><span class="o">;</span>


            <span class="nx">Dom</span><span class="o">.</span><span class="nx">addClass</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">,</span> <span class="k">this</span><span class="o">.</span><span class="nx">CSS_CLASS_NAME</span><span class="o">);</span>
            <span class="nx">Dom</span><span class="o">.</span><span class="nx">addClass</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span><span class="o">,</span> <span class="k">this</span><span class="o">.</span><span class="nx">CSS_LABEL_CLASS_NAME</span><span class="o">);</span>


			<span class="nx">i</span> <span class="o">=</span> <span class="nx">EVENT_TYPES</span><span class="o">.</span><span class="nx">length</span> <span class="o">-</span> <span class="m">1</span><span class="o">;</span>

			<span class="k">do</span> <span class="o">{</span>

				<span class="nx">aEventData</span> <span class="o">=</span> <span class="nx">EVENT_TYPES</span><span class="o">[</span><span class="nx">i</span><span class="o">];</span>

				<span class="nx">oCustomEvent</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">createEvent</span><span class="o">(</span><span class="nx">aEventData</span><span class="o">[</span><span class="m">1</span><span class="o">]);</span>
				<span class="nx">oCustomEvent</span><span class="o">.</span><span class="nx">signature</span> <span class="o">=</span> <span class="nx">CustomEvent</span><span class="o">.</span><span class="nx">LIST</span><span class="o">;</span>
				
				<span class="k">this</span><span class="o">[</span><span class="nx">aEventData</span><span class="o">[</span><span class="m">0</span><span class="o">]]</span> <span class="o">=</span> <span class="nx">oCustomEvent</span><span class="o">;</span>

			<span class="o">}</span>
			<span class="k">while</span> <span class="o">(</span><span class="nx">i</span><span class="o">--);</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">p_oConfig</span><span class="o">)</span> <span class="o">{</span>
    
                <span class="nx">oConfig</span><span class="o">.</span><span class="nx">applyConfig</span><span class="o">(</span><span class="nx">p_oConfig</span><span class="o">);</span>
    
            <span class="o">}</span>        

            <span class="nx">oConfig</span><span class="o">.</span><span class="nx">fireQueue</span><span class="o">();</span>

        <span class="o">}</span>

    <span class="o">},</span>



    <span class="c">// Private methods</span>
<span class="c"></span>
    <span class="c">/**</span>
<span class="c">    * @method _createRootNodeStructure</span>
<span class="c">    * @description Creates the core DOM structure for the menu item.</span>
<span class="c">    * @private</span>
<span class="c">    */</span>
    <span class="nx">_createRootNodeStructure</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">oElement</span><span class="o">,</span>
            <span class="nx">oAnchor</span><span class="o">;</span>

        <span class="k">if</span> <span class="o">(!</span><span class="nx">m_oMenuItemTemplate</span><span class="o">)</span> <span class="o">{</span>

            <span class="nx">m_oMenuItemTemplate</span> <span class="o">=</span> <span class="nb">document</span><span class="o">.</span><span class="nx">createElement</span><span class="o">(</span><span class="nx">_LI_LOWERCASE</span><span class="o">);</span>
            <span class="nx">m_oMenuItemTemplate</span><span class="o">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">_ANCHOR_TEMPLATE</span><span class="o">;</span>

        <span class="o">}</span>

        <span class="nx">oElement</span> <span class="o">=</span> <span class="nx">m_oMenuItemTemplate</span><span class="o">.</span><span class="nx">cloneNode</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
        <span class="nx">oElement</span><span class="o">.</span><span class="nx">className</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">CSS_CLASS_NAME</span><span class="o">;</span>

        <span class="nx">oAnchor</span> <span class="o">=</span> <span class="nx">oElement</span><span class="o">.</span><span class="nx">firstChild</span><span class="o">;</span>
        <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">className</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">CSS_LABEL_CLASS_NAME</span><span class="o">;</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">element</span> <span class="o">=</span> <span class="nx">oElement</span><span class="o">;</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span> <span class="o">=</span> <span class="nx">oAnchor</span><span class="o">;</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method _initSubTree</span>
<span class="c">    * @description Iterates the source element&#39;s childNodes collection and uses </span>
<span class="c">    * the child nodes to instantiate other menus.</span>
<span class="c">    * @private</span>
<span class="c">    */</span>
    <span class="nx">_initSubTree</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">oSrcEl</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">srcElement</span><span class="o">,</span>
            <span class="nx">oConfig</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">,</span>
            <span class="nx">oNode</span><span class="o">,</span>
            <span class="nx">aOptions</span><span class="o">,</span>
            <span class="nx">nOptions</span><span class="o">,</span>
            <span class="nx">oMenu</span><span class="o">,</span>
            <span class="nx">n</span><span class="o">;</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">oSrcEl</span><span class="o">.</span><span class="nx">childNodes</span><span class="o">.</span><span class="nx">length</span> <span class="o">&gt;</span> <span class="m">0</span><span class="o">)</span> <span class="o">{</span>

            <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">parent</span><span class="o">.</span><span class="nx">lazyLoad</span> <span class="o">&amp;&amp;</span> <span class="k">this</span><span class="o">.</span><span class="nx">parent</span><span class="o">.</span><span class="nx">srcElement</span> <span class="o">&amp;&amp;</span> 
                <span class="k">this</span><span class="o">.</span><span class="nx">parent</span><span class="o">.</span><span class="nx">srcElement</span><span class="o">.</span><span class="nx">tagName</span><span class="o">.</span><span class="nx">toUpperCase</span><span class="o">()</span> <span class="o">==</span> <span class="nx">_SELECT</span><span class="o">)</span> <span class="o">{</span>

                <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span>
                        <span class="nx">_SUBMENU</span><span class="o">,</span> 
                        <span class="o">{</span> <span class="nx">id</span><span class="o">:</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">generateId</span><span class="o">(),</span> <span class="nx">itemdata</span><span class="o">:</span> <span class="nx">oSrcEl</span><span class="o">.</span><span class="nx">childNodes</span> <span class="o">}</span>
                    <span class="o">);</span>

            <span class="o">}</span>
            <span class="k">else</span> <span class="o">{</span>

                <span class="nx">oNode</span> <span class="o">=</span> <span class="nx">oSrcEl</span><span class="o">.</span><span class="nx">firstChild</span><span class="o">;</span>
                <span class="nx">aOptions</span> <span class="o">=</span> <span class="o">[];</span>
    
                <span class="k">do</span> <span class="o">{</span>
    
                    <span class="k">if</span> <span class="o">(</span><span class="nx">oNode</span> <span class="o">&amp;&amp;</span> <span class="nx">oNode</span><span class="o">.</span><span class="nx">tagName</span><span class="o">)</span> <span class="o">{</span>
    
                        <span class="nx">switch</span><span class="o">(</span><span class="nx">oNode</span><span class="o">.</span><span class="nx">tagName</span><span class="o">.</span><span class="nx">toUpperCase</span><span class="o">())</span> <span class="o">{</span>
                
                            <span class="nx">case</span> <span class="nx">_DIV</span><span class="o">:</span>
                
                                <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_SUBMENU</span><span class="o">,</span> <span class="nx">oNode</span><span class="o">);</span>
                
                            <span class="k">break</span><span class="o">;</span>
         
                            <span class="nx">case</span> <span class="nx">_OPTION</span><span class="o">:</span>
        
                                <span class="nx">aOptions</span><span class="o">[</span><span class="nx">aOptions</span><span class="o">.</span><span class="nx">length</span><span class="o">]</span> <span class="o">=</span> <span class="nx">oNode</span><span class="o">;</span>
        
                            <span class="k">break</span><span class="o">;</span>
               
                        <span class="o">}</span>
                    
                    <span class="o">}</span>
                
                <span class="o">}</span>        
                <span class="k">while</span><span class="o">((</span><span class="nx">oNode</span> <span class="o">=</span> <span class="nx">oNode</span><span class="o">.</span><span class="nx">nextSibling</span><span class="o">));</span>
    
    
                <span class="nx">nOptions</span> <span class="o">=</span> <span class="nx">aOptions</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span>
    
                <span class="k">if</span> <span class="o">(</span><span class="nx">nOptions</span> <span class="o">&gt;</span> <span class="m">0</span><span class="o">)</span> <span class="o">{</span>
    
                    <span class="nx">oMenu</span> <span class="o">=</span> <span class="k">new</span> <span class="k">this</span><span class="o">.</span><span class="nx">SUBMENU_TYPE</span><span class="o">(</span><span class="nx">Dom</span><span class="o">.</span><span class="nx">generateId</span><span class="o">());</span>
                    
                    <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_SUBMENU</span><span class="o">,</span> <span class="nx">oMenu</span><span class="o">);</span>
    
                    <span class="k">for</span><span class="o">(</span><span class="nx">n</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">n</span><span class="o">&lt;</span><span class="nx">nOptions</span><span class="o">;</span> <span class="nx">n</span><span class="o">++)</span> <span class="o">{</span>
        
                        <span class="nx">oMenu</span><span class="o">.</span><span class="nx">addItem</span><span class="o">((</span><span class="k">new</span> <span class="nx">oMenu</span><span class="o">.</span><span class="nx">ITEM_TYPE</span><span class="o">(</span><span class="nx">aOptions</span><span class="o">[</span><span class="nx">n</span><span class="o">])));</span>
        
                    <span class="o">}</span>
        
                <span class="o">}</span>
            
            <span class="o">}</span>

        <span class="o">}</span>

    <span class="o">},</span>



    <span class="c">// Event handlers for configuration properties</span>
<span class="c"></span>

    <span class="c">/**</span>
<span class="c">    * @method configText</span>
<span class="c">    * @description Event handler for when the &quot;text&quot; configuration property of </span>
<span class="c">    * the menu item changes.</span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>
    <span class="nx">configText</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">sText</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">],</span>
            <span class="nx">oConfig</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">,</span>
            <span class="nx">oAnchor</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span><span class="o">,</span>
            <span class="nx">sHelpText</span> <span class="o">=</span> <span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_HELP_TEXT</span><span class="o">),</span>
            <span class="nx">sHelpTextHTML</span> <span class="o">=</span> <span class="nx">_EMPTY_STRING</span><span class="o">,</span>
            <span class="nx">sEmphasisStartTag</span> <span class="o">=</span> <span class="nx">_EMPTY_STRING</span><span class="o">,</span>
            <span class="nx">sEmphasisEndTag</span> <span class="o">=</span> <span class="nx">_EMPTY_STRING</span><span class="o">;</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">sText</span><span class="o">)</span> <span class="o">{</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">sHelpText</span><span class="o">)</span> <span class="o">{</span>
                    
                <span class="nx">sHelpTextHTML</span> <span class="o">=</span> <span class="nx">_START_HELP_TEXT</span> <span class="o">+</span> <span class="nx">sHelpText</span> <span class="o">+</span> <span class="nx">_END_EM</span><span class="o">;</span>
            
            <span class="o">}</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_EMPHASIS</span><span class="o">))</span> <span class="o">{</span>

                <span class="nx">sEmphasisStartTag</span> <span class="o">=</span> <span class="nx">_START_EM</span><span class="o">;</span>
                <span class="nx">sEmphasisEndTag</span> <span class="o">=</span> <span class="nx">_END_EM</span><span class="o">;</span>

            <span class="o">}</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_STRONG_EMPHASIS</span><span class="o">))</span> <span class="o">{</span>

                <span class="nx">sEmphasisStartTag</span> <span class="o">=</span> <span class="nx">_START_STRONG</span><span class="o">;</span>
                <span class="nx">sEmphasisEndTag</span> <span class="o">=</span> <span class="nx">_END_STRONG</span><span class="o">;</span>
            
            <span class="o">}</span>


            <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="o">(</span><span class="nx">sEmphasisStartTag</span> <span class="o">+</span> <span class="nx">sText</span> <span class="o">+</span> <span class="nx">sEmphasisEndTag</span> <span class="o">+</span> <span class="nx">sHelpTextHTML</span><span class="o">);</span>

        <span class="o">}</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configHelpText</span>
<span class="c">    * @description Event handler for when the &quot;helptext&quot; configuration property </span>
<span class="c">    * of the menu item changes.</span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>    
    <span class="nx">configHelpText</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">refireEvent</span><span class="o">(</span><span class="nx">_TEXT</span><span class="o">);</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configURL</span>
<span class="c">    * @description Event handler for when the &quot;url&quot; configuration property of </span>
<span class="c">    * the menu item changes.</span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>    
    <span class="nx">configURL</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">sURL</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">];</span>

        <span class="k">if</span> <span class="o">(!</span><span class="nx">sURL</span><span class="o">)</span> <span class="o">{</span>

            <span class="nx">sURL</span> <span class="o">=</span> <span class="nx">_HASH</span><span class="o">;</span>

        <span class="o">}</span>

        <span class="k">var</span> <span class="nx">oAnchor</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span><span class="o">;</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">UA</span><span class="o">.</span><span class="nx">opera</span><span class="o">)</span> <span class="o">{</span>

            <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">removeAttribute</span><span class="o">(</span><span class="nx">_HREF</span><span class="o">);</span>
        
        <span class="o">}</span>

        <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">setAttribute</span><span class="o">(</span><span class="nx">_HREF</span><span class="o">,</span> <span class="nx">sURL</span><span class="o">);</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configTarget</span>
<span class="c">    * @description Event handler for when the &quot;target&quot; configuration property </span>
<span class="c">    * of the menu item changes.  </span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>    
    <span class="nx">configTarget</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">sTarget</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">],</span>
            <span class="nx">oAnchor</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span><span class="o">;</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">sTarget</span> <span class="o">&amp;&amp;</span> <span class="nx">sTarget</span><span class="o">.</span><span class="nx">length</span> <span class="o">&gt;</span> <span class="m">0</span><span class="o">)</span> <span class="o">{</span>

            <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">setAttribute</span><span class="o">(</span><span class="nx">_TARGET</span><span class="o">,</span> <span class="nx">sTarget</span><span class="o">);</span>

        <span class="o">}</span>
        <span class="k">else</span> <span class="o">{</span>

            <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">removeAttribute</span><span class="o">(</span><span class="nx">_TARGET</span><span class="o">);</span>
        
        <span class="o">}</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configEmphasis</span>
<span class="c">    * @description Event handler for when the &quot;emphasis&quot; configuration property</span>
<span class="c">    * of the menu item changes.</span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>    
    <span class="nx">configEmphasis</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">bEmphasis</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">],</span>
            <span class="nx">oConfig</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">;</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">bEmphasis</span> <span class="o">&amp;&amp;</span> <span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_STRONG_EMPHASIS</span><span class="o">))</span> <span class="o">{</span>

            <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_STRONG_EMPHASIS</span><span class="o">,</span> <span class="kc">false</span><span class="o">);</span>

        <span class="o">}</span>


        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">refireEvent</span><span class="o">(</span><span class="nx">_TEXT</span><span class="o">);</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configStrongEmphasis</span>
<span class="c">    * @description Event handler for when the &quot;strongemphasis&quot; configuration </span>
<span class="c">    * property of the menu item changes.</span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>    
    <span class="nx">configStrongEmphasis</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">bStrongEmphasis</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">],</span>
            <span class="nx">oConfig</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">;</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">bStrongEmphasis</span> <span class="o">&amp;&amp;</span> <span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_EMPHASIS</span><span class="o">))</span> <span class="o">{</span>

            <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_EMPHASIS</span><span class="o">,</span> <span class="kc">false</span><span class="o">);</span>

        <span class="o">}</span>

        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">refireEvent</span><span class="o">(</span><span class="nx">_TEXT</span><span class="o">);</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configChecked</span>
<span class="c">    * @description Event handler for when the &quot;checked&quot; configuration property </span>
<span class="c">    * of the menu item changes. </span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>    
    <span class="nx">configChecked</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">bChecked</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">],</span>
            <span class="nx">oConfig</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">;</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">bChecked</span><span class="o">)</span> <span class="o">{</span>

            <span class="nx">addClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_CHECKED</span><span class="o">);</span>

        <span class="o">}</span>
        <span class="k">else</span> <span class="o">{</span>

            <span class="nx">removeClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_CHECKED</span><span class="o">);</span>
        <span class="o">}</span>


        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">refireEvent</span><span class="o">(</span><span class="nx">_TEXT</span><span class="o">);</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">))</span> <span class="o">{</span>

            <span class="nx">oConfig</span><span class="o">.</span><span class="nx">refireEvent</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">);</span>

        <span class="o">}</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_SELECTED</span><span class="o">))</span> <span class="o">{</span>

            <span class="nx">oConfig</span><span class="o">.</span><span class="nx">refireEvent</span><span class="o">(</span><span class="nx">_SELECTED</span><span class="o">);</span>

        <span class="o">}</span>

    <span class="o">},</span>



    <span class="c">/**</span>
<span class="c">    * @method configDisabled</span>
<span class="c">    * @description Event handler for when the &quot;disabled&quot; configuration property </span>
<span class="c">    * of the menu item changes. </span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>    
    <span class="nx">configDisabled</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">bDisabled</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">],</span>
            <span class="nx">oConfig</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">,</span>
            <span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_SUBMENU</span><span class="o">),</span>
            <span class="nx">bChecked</span> <span class="o">=</span> <span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_CHECKED</span><span class="o">);</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">bDisabled</span><span class="o">)</span> <span class="o">{</span>

            <span class="k">if</span> <span class="o">(</span><span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_SELECTED</span><span class="o">))</span> <span class="o">{</span>

                <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_SELECTED</span><span class="o">,</span> <span class="kc">false</span><span class="o">);</span>

            <span class="o">}</span>


			<span class="nx">addClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_DISABLED</span><span class="o">);</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">oSubmenu</span><span class="o">)</span> <span class="o">{</span>

				<span class="nx">addClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_HAS_SUBMENU_DISABLED</span><span class="o">);</span>
            
            <span class="o">}</span>
            

            <span class="k">if</span> <span class="o">(</span><span class="nx">bChecked</span><span class="o">)</span> <span class="o">{</span>

				<span class="nx">addClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_CHECKED_DISABLED</span><span class="o">);</span>

            <span class="o">}</span>

        <span class="o">}</span>
        <span class="k">else</span> <span class="o">{</span>

			<span class="nx">removeClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_DISABLED</span><span class="o">);</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">oSubmenu</span><span class="o">)</span> <span class="o">{</span>

				<span class="nx">removeClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_HAS_SUBMENU_DISABLED</span><span class="o">);</span>
            
            <span class="o">}</span>
            

            <span class="k">if</span> <span class="o">(</span><span class="nx">bChecked</span><span class="o">)</span> <span class="o">{</span>

				<span class="nx">removeClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_CHECKED_DISABLED</span><span class="o">);</span>

            <span class="o">}</span>

        <span class="o">}</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configSelected</span>
<span class="c">    * @description Event handler for when the &quot;selected&quot; configuration property </span>
<span class="c">    * of the menu item changes. </span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>    
    <span class="nx">configSelected</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">oConfig</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">,</span>
        	<span class="nx">oAnchor</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span><span class="o">,</span>
        	
            <span class="nx">bSelected</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">],</span>
            <span class="nx">bChecked</span> <span class="o">=</span> <span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_CHECKED</span><span class="o">),</span>
            <span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_SUBMENU</span><span class="o">);</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">UA</span><span class="o">.</span><span class="nx">opera</span><span class="o">)</span> <span class="o">{</span>

            <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">blur</span><span class="o">();</span>
        
        <span class="o">}</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">bSelected</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">))</span> <span class="o">{</span>

			<span class="nx">addClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_SELECTED</span><span class="o">);</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">oSubmenu</span><span class="o">)</span> <span class="o">{</span>

				<span class="nx">addClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_HAS_SUBMENU_SELECTED</span><span class="o">);</span>
            
            <span class="o">}</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">bChecked</span><span class="o">)</span> <span class="o">{</span>

				<span class="nx">addClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_CHECKED_SELECTED</span><span class="o">);</span>

            <span class="o">}</span>

        <span class="o">}</span>
        <span class="k">else</span> <span class="o">{</span>

			<span class="nx">removeClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_SELECTED</span><span class="o">);</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">oSubmenu</span><span class="o">)</span> <span class="o">{</span>

				<span class="nx">removeClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_HAS_SUBMENU_SELECTED</span><span class="o">);</span>
            
            <span class="o">}</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">bChecked</span><span class="o">)</span> <span class="o">{</span>

				<span class="nx">removeClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_CHECKED_SELECTED</span><span class="o">);</span>

            <span class="o">}</span>

        <span class="o">}</span>


        <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">hasFocus</span><span class="o">()</span> <span class="o">&amp;&amp;</span> <span class="nx">UA</span><span class="o">.</span><span class="nx">opera</span><span class="o">)</span> <span class="o">{</span>
        
            <span class="nx">oAnchor</span><span class="o">.</span><span class="nx">focus</span><span class="o">();</span>
        
        <span class="o">}</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method _onSubmenuBeforeHide</span>
<span class="c">    * @description &quot;beforehide&quot; Custom Event handler for a submenu.</span>
<span class="c">    * @private</span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    */</span>
    <span class="nx">_onSubmenuBeforeHide</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">oItem</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">parent</span><span class="o">,</span>
            <span class="nx">oMenu</span><span class="o">;</span>

        <span class="k">function</span> <span class="nx">onHide</span><span class="o">()</span> <span class="o">{</span>

            <span class="nx">oItem</span><span class="o">.</span><span class="nx">_oAnchor</span><span class="o">.</span><span class="nx">blur</span><span class="o">();</span>
            <span class="nx">oMenu</span><span class="o">.</span><span class="nx">beforeHideEvent</span><span class="o">.</span><span class="nx">unsubscribe</span><span class="o">(</span><span class="nx">onHide</span><span class="o">);</span>
        
        <span class="o">}</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">oItem</span><span class="o">.</span><span class="nx">hasFocus</span><span class="o">())</span> <span class="o">{</span>

            <span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">oItem</span><span class="o">.</span><span class="nx">parent</span><span class="o">;</span>

            <span class="nx">oMenu</span><span class="o">.</span><span class="nx">beforeHideEvent</span><span class="o">.</span><span class="nx">subscribe</span><span class="o">(</span><span class="nx">onHide</span><span class="o">);</span>
        
        <span class="o">}</span>
    
    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configSubmenu</span>
<span class="c">    * @description Event handler for when the &quot;submenu&quot; configuration property </span>
<span class="c">    * of the menu item changes. </span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>
    <span class="nx">configSubmenu</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">],</span>
            <span class="nx">oConfig</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">,</span>
            <span class="nx">bLazyLoad</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">parent</span> <span class="o">&amp;&amp;</span> <span class="k">this</span><span class="o">.</span><span class="nx">parent</span><span class="o">.</span><span class="nx">lazyLoad</span><span class="o">,</span>
            <span class="nx">oMenu</span><span class="o">,</span>
            <span class="nx">sSubmenuId</span><span class="o">,</span>
            <span class="nx">oSubmenuConfig</span><span class="o">;</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">oSubmenu</span><span class="o">)</span> <span class="o">{</span>

            <span class="k">if</span> <span class="o">(</span><span class="nx">oSubmenu</span> <span class="k">instanceof</span> <span class="nx">Menu</span><span class="o">)</span> <span class="o">{</span>

                <span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">oSubmenu</span><span class="o">;</span>
                <span class="nx">oMenu</span><span class="o">.</span><span class="nx">parent</span> <span class="o">=</span> <span class="k">this</span><span class="o">;</span>
                <span class="nx">oMenu</span><span class="o">.</span><span class="nx">lazyLoad</span> <span class="o">=</span> <span class="nx">bLazyLoad</span><span class="o">;</span>

            <span class="o">}</span>
            <span class="k">else</span> <span class="k">if</span> <span class="o">(</span><span class="nx">Lang</span><span class="o">.</span><span class="nx">isObject</span><span class="o">(</span><span class="nx">oSubmenu</span><span class="o">)</span> <span class="o">&amp;&amp;</span> <span class="nx">oSubmenu</span><span class="o">.</span><span class="nx">id</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">oSubmenu</span><span class="o">.</span><span class="nx">nodeType</span><span class="o">)</span> <span class="o">{</span>

                <span class="nx">sSubmenuId</span> <span class="o">=</span> <span class="nx">oSubmenu</span><span class="o">.</span><span class="nx">id</span><span class="o">;</span>
                <span class="nx">oSubmenuConfig</span> <span class="o">=</span> <span class="nx">oSubmenu</span><span class="o">;</span>

                <span class="nx">oSubmenuConfig</span><span class="o">.</span><span class="nx">lazyload</span> <span class="o">=</span> <span class="nx">bLazyLoad</span><span class="o">;</span>
                <span class="nx">oSubmenuConfig</span><span class="o">.</span><span class="nx">parent</span> <span class="o">=</span> <span class="k">this</span><span class="o">;</span>

                <span class="nx">oMenu</span> <span class="o">=</span> <span class="k">new</span> <span class="k">this</span><span class="o">.</span><span class="nx">SUBMENU_TYPE</span><span class="o">(</span><span class="nx">sSubmenuId</span><span class="o">,</span> <span class="nx">oSubmenuConfig</span><span class="o">);</span>


                <span class="c">// Set the value of the property to the Menu instance</span>
<span class="c"></span>
                <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_SUBMENU</span><span class="o">,</span> <span class="nx">oMenu</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>

            <span class="o">}</span>
            <span class="k">else</span> <span class="o">{</span>

                <span class="nx">oMenu</span> <span class="o">=</span> <span class="k">new</span> <span class="k">this</span><span class="o">.</span><span class="nx">SUBMENU_TYPE</span><span class="o">(</span><span class="nx">oSubmenu</span><span class="o">,</span> <span class="o">{</span> <span class="nx">lazyload</span><span class="o">:</span> <span class="nx">bLazyLoad</span><span class="o">,</span> <span class="nx">parent</span><span class="o">:</span> <span class="k">this</span> <span class="o">});</span>


                <span class="c">// Set the value of the property to the Menu instance</span>
<span class="c"></span>                
                <span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_SUBMENU</span><span class="o">,</span> <span class="nx">oMenu</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>

            <span class="o">}</span>


            <span class="k">if</span> <span class="o">(</span><span class="nx">oMenu</span><span class="o">)</span> <span class="o">{</span>

				<span class="nx">oMenu</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_PREVENT_CONTEXT_OVERLAP</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>

                <span class="nx">addClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_HAS_SUBMENU</span><span class="o">);</span>


				<span class="k">if</span> <span class="o">(</span><span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_URL</span><span class="o">)</span> <span class="o">===</span> <span class="nx">_HASH</span><span class="o">)</span> <span class="o">{</span>
				
					<span class="nx">oConfig</span><span class="o">.</span><span class="nx">setProperty</span><span class="o">(</span><span class="nx">_URL</span><span class="o">,</span> <span class="o">(</span><span class="nx">_HASH</span> <span class="o">+</span> <span class="nx">oMenu</span><span class="o">.</span><span class="nx">id</span><span class="o">));</span>
				
				<span class="o">}</span>


                <span class="k">this</span><span class="o">.</span><span class="nx">_oSubmenu</span> <span class="o">=</span> <span class="nx">oMenu</span><span class="o">;</span>


                <span class="k">if</span> <span class="o">(</span><span class="nx">UA</span><span class="o">.</span><span class="nx">opera</span><span class="o">)</span> <span class="o">{</span>
                
                    <span class="nx">oMenu</span><span class="o">.</span><span class="nx">beforeHideEvent</span><span class="o">.</span><span class="nx">subscribe</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_onSubmenuBeforeHide</span><span class="o">);</span>               
                
                <span class="o">}</span>
            
            <span class="o">}</span>

        <span class="o">}</span>
        <span class="k">else</span> <span class="o">{</span>

			<span class="nx">removeClassNameForState</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">_HAS_SUBMENU</span><span class="o">);</span>

            <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_oSubmenu</span><span class="o">)</span> <span class="o">{</span>

                <span class="k">this</span><span class="o">.</span><span class="nx">_oSubmenu</span><span class="o">.</span><span class="nx">destroy</span><span class="o">();</span>

            <span class="o">}</span>

        <span class="o">}</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">))</span> <span class="o">{</span>

            <span class="nx">oConfig</span><span class="o">.</span><span class="nx">refireEvent</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">);</span>

        <span class="o">}</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">oConfig</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_SELECTED</span><span class="o">))</span> <span class="o">{</span>

            <span class="nx">oConfig</span><span class="o">.</span><span class="nx">refireEvent</span><span class="o">(</span><span class="nx">_SELECTED</span><span class="o">);</span>

        <span class="o">}</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configOnClick</span>
<span class="c">    * @description Event handler for when the &quot;onclick&quot; configuration property </span>
<span class="c">    * of the menu item changes. </span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>
    <span class="nx">configOnClick</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">oObject</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">];</span>

        <span class="c">/*</span>
<span class="c">            Remove any existing listeners if a &quot;click&quot; event handler has </span>
<span class="c">            already been specified.</span>
<span class="c">        */</span>

        <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_oOnclickAttributeValue</span> <span class="o">&amp;&amp;</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_oOnclickAttributeValue</span> <span class="o">!=</span> <span class="nx">oObject</span><span class="o">))</span> <span class="o">{</span>

            <span class="k">this</span><span class="o">.</span><span class="nx">clickEvent</span><span class="o">.</span><span class="nx">unsubscribe</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_oOnclickAttributeValue</span><span class="o">.</span><span class="nx">fn</span><span class="o">,</span> 
                                <span class="k">this</span><span class="o">.</span><span class="nx">_oOnclickAttributeValue</span><span class="o">.</span><span class="nx">obj</span><span class="o">);</span>

            <span class="k">this</span><span class="o">.</span><span class="nx">_oOnclickAttributeValue</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

        <span class="o">}</span>


        <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">_oOnclickAttributeValue</span> <span class="o">&amp;&amp;</span> <span class="nx">Lang</span><span class="o">.</span><span class="nx">isObject</span><span class="o">(</span><span class="nx">oObject</span><span class="o">)</span> <span class="o">&amp;&amp;</span> 
            <span class="nx">Lang</span><span class="o">.</span><span class="nx">isFunction</span><span class="o">(</span><span class="nx">oObject</span><span class="o">.</span><span class="nx">fn</span><span class="o">))</span> <span class="o">{</span>
            
            <span class="k">this</span><span class="o">.</span><span class="nx">clickEvent</span><span class="o">.</span><span class="nx">subscribe</span><span class="o">(</span><span class="nx">oObject</span><span class="o">.</span><span class="nx">fn</span><span class="o">,</span> 
                <span class="o">((</span><span class="nx">_OBJ</span> <span class="k">in</span> <span class="nx">oObject</span><span class="o">)</span> <span class="o">?</span> <span class="nx">oObject</span><span class="o">.</span><span class="nx">obj</span> <span class="o">:</span> <span class="k">this</span><span class="o">),</span> 
                <span class="o">((</span><span class="nx">_SCOPE</span> <span class="k">in</span> <span class="nx">oObject</span><span class="o">)</span> <span class="o">?</span> <span class="nx">oObject</span><span class="o">.</span><span class="nx">scope</span> <span class="o">:</span> <span class="kc">null</span><span class="o">)</span> <span class="o">);</span>

            <span class="k">this</span><span class="o">.</span><span class="nx">_oOnclickAttributeValue</span> <span class="o">=</span> <span class="nx">oObject</span><span class="o">;</span>

        <span class="o">}</span>
    
    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configClassName</span>
<span class="c">    * @description Event handler for when the &quot;classname&quot; configuration </span>
<span class="c">    * property of a menu item changes.</span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item</span>
<span class="c">    * that fired the event.</span>
<span class="c">    */</span>
    <span class="nx">configClassName</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">,</span> <span class="nx">p_oItem</span><span class="o">)</span> <span class="o">{</span>
    
        <span class="k">var</span> <span class="nx">sClassName</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">];</span>
    
        <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_sClassName</span><span class="o">)</span> <span class="o">{</span>
    
            <span class="nx">Dom</span><span class="o">.</span><span class="nx">removeClass</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">,</span> <span class="k">this</span><span class="o">.</span><span class="nx">_sClassName</span><span class="o">);</span>
    
        <span class="o">}</span>
    
        <span class="nx">Dom</span><span class="o">.</span><span class="nx">addClass</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">,</span> <span class="nx">sClassName</span><span class="o">);</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">_sClassName</span> <span class="o">=</span> <span class="nx">sClassName</span><span class="o">;</span>
    
    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method _dispatchClickEvent</span>
<span class="c">    * @description Dispatches a DOM &quot;click&quot; event to the anchor element of a </span>
<span class="c">	* MenuItem instance.</span>
<span class="c">	* @private	</span>
<span class="c">    */</span>
	<span class="nx">_dispatchClickEvent</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

		<span class="k">var</span> <span class="nx">oMenuItem</span> <span class="o">=</span> <span class="k">this</span><span class="o">,</span>
			<span class="nx">oAnchor</span><span class="o">,</span>
			<span class="nx">oEvent</span><span class="o">;</span>

		<span class="k">if</span> <span class="o">(!</span><span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">))</span> <span class="o">{</span>

			<span class="nx">oAnchor</span> <span class="o">=</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">getFirstChild</span><span class="o">(</span><span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">element</span><span class="o">);</span>

			<span class="c">//	Dispatch a &quot;click&quot; event to the MenuItem&#39;s anchor so that its</span>
<span class="c"></span>			<span class="c">//	&quot;click&quot; event handlers will get called in response to the user </span>
<span class="c"></span>			<span class="c">//	pressing the keyboard shortcut defined by the &quot;keylistener&quot;</span>
<span class="c"></span>			<span class="c">//	configuration property.</span>
<span class="c"></span>
			<span class="k">if</span> <span class="o">(</span><span class="nx">UA</span><span class="o">.</span><span class="nx">ie</span><span class="o">)</span> <span class="o">{</span>
				<span class="nx">oAnchor</span><span class="o">.</span><span class="nx">fireEvent</span><span class="o">(</span><span class="nx">_ONCLICK</span><span class="o">);</span>
			<span class="o">}</span>
			<span class="k">else</span> <span class="o">{</span>

				<span class="k">if</span> <span class="o">((</span><span class="nx">UA</span><span class="o">.</span><span class="nx">gecko</span> <span class="o">&amp;&amp;</span> <span class="nx">UA</span><span class="o">.</span><span class="nx">gecko</span> <span class="o">&gt;=</span> <span class="m">1</span><span class="o">.</span><span class="m">9</span><span class="o">)</span> <span class="o">||</span> <span class="nx">UA</span><span class="o">.</span><span class="nx">opera</span> <span class="o">||</span> <span class="nx">UA</span><span class="o">.</span><span class="nx">webkit</span><span class="o">)</span> <span class="o">{</span>

					<span class="nx">oEvent</span> <span class="o">=</span> <span class="nb">document</span><span class="o">.</span><span class="nx">createEvent</span><span class="o">(</span><span class="s2">&quot;HTMLEvents&quot;</span><span class="o">);</span>
					<span class="nx">oEvent</span><span class="o">.</span><span class="nx">initEvent</span><span class="o">(</span><span class="nx">_CLICK</span><span class="o">,</span> <span class="kc">true</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>

				<span class="o">}</span>
				<span class="k">else</span> <span class="o">{</span>

					<span class="nx">oEvent</span> <span class="o">=</span> <span class="nb">document</span><span class="o">.</span><span class="nx">createEvent</span><span class="o">(</span><span class="s2">&quot;MouseEvents&quot;</span><span class="o">);</span>
					<span class="nx">oEvent</span><span class="o">.</span><span class="nx">initMouseEvent</span><span class="o">(</span><span class="nx">_CLICK</span><span class="o">,</span> <span class="kc">true</span><span class="o">,</span> <span class="kc">true</span><span class="o">,</span> <span class="nb">window</span><span class="o">,</span> <span class="m">0</span><span class="o">,</span> <span class="m">0</span><span class="o">,</span> <span class="m">0</span><span class="o">,</span> 
						<span class="m">0</span><span class="o">,</span> <span class="m">0</span><span class="o">,</span> <span class="kc">false</span><span class="o">,</span> <span class="kc">false</span><span class="o">,</span> <span class="kc">false</span><span class="o">,</span> <span class="kc">false</span><span class="o">,</span> <span class="m">0</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>

				<span class="o">}</span>

				<span class="nx">oAnchor</span><span class="o">.</span><span class="nx">dispatchEvent</span><span class="o">(</span><span class="nx">oEvent</span><span class="o">);</span>

			<span class="o">}</span>

		<span class="o">}</span>

	<span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method _createKeyListener</span>
<span class="c">    * @description &quot;show&quot; event handler for a Menu instance - responsible for </span>
<span class="c">	* setting up the KeyListener instance for a MenuItem.</span>
<span class="c">	* @private	</span>
<span class="c">    * @param {String} type String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} args Array of arguments sent when the event was fired.</span>
<span class="c">    * @param {Array} keyData Array of arguments sent when the event was fired.</span>
<span class="c">    */</span>
	<span class="nx">_createKeyListener</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">type</span><span class="o">,</span> <span class="nx">args</span><span class="o">,</span> <span class="nx">keyData</span><span class="o">)</span> <span class="o">{</span>

		<span class="k">var</span> <span class="nx">oMenuItem</span> <span class="o">=</span> <span class="k">this</span><span class="o">,</span>
			<span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">parent</span><span class="o">;</span>

		<span class="k">var</span> <span class="nx">oKeyListener</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">KeyListener</span><span class="o">(</span>
										<span class="nx">oMenu</span><span class="o">.</span><span class="nx">element</span><span class="o">.</span><span class="nx">ownerDocument</span><span class="o">,</span> 
										<span class="nx">keyData</span><span class="o">,</span> 
										<span class="o">{</span>
											<span class="nx">fn</span><span class="o">:</span> <span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_dispatchClickEvent</span><span class="o">,</span> 
											<span class="nx">scope</span><span class="o">:</span> <span class="nx">oMenuItem</span><span class="o">,</span> 
											<span class="nx">correctScope</span><span class="o">:</span> <span class="kc">true</span> <span class="o">});</span>


		<span class="k">if</span> <span class="o">(</span><span class="nx">oMenu</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_VISIBLE</span><span class="o">))</span> <span class="o">{</span>
			<span class="nx">oKeyListener</span><span class="o">.</span><span class="nx">enable</span><span class="o">();</span>
		<span class="o">}</span>


		<span class="nx">oMenu</span><span class="o">.</span><span class="nx">subscribe</span><span class="o">(</span><span class="nx">_SHOW</span><span class="o">,</span> <span class="nx">oKeyListener</span><span class="o">.</span><span class="nx">enable</span><span class="o">,</span> <span class="kc">null</span><span class="o">,</span> <span class="nx">oKeyListener</span><span class="o">);</span>
		<span class="nx">oMenu</span><span class="o">.</span><span class="nx">subscribe</span><span class="o">(</span><span class="nx">_HIDE</span><span class="o">,</span> <span class="nx">oKeyListener</span><span class="o">.</span><span class="nx">disable</span><span class="o">,</span> <span class="kc">null</span><span class="o">,</span> <span class="nx">oKeyListener</span><span class="o">);</span>
		
		<span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_keyListener</span> <span class="o">=</span> <span class="nx">oKeyListener</span><span class="o">;</span>
		
		<span class="nx">oMenu</span><span class="o">.</span><span class="nx">unsubscribe</span><span class="o">(</span><span class="nx">_SHOW</span><span class="o">,</span> <span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_createKeyListener</span><span class="o">,</span> <span class="nx">keyData</span><span class="o">);</span>
		
	<span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method configKeyListener</span>
<span class="c">    * @description Event handler for when the &quot;keylistener&quot; configuration </span>
<span class="c">    * property of a menu item changes.</span>
<span class="c">    * @param {String} p_sType String representing the name of the event that </span>
<span class="c">    * was fired.</span>
<span class="c">    * @param {Array} p_aArgs Array of arguments sent when the event was fired.</span>
<span class="c">    */</span>
    <span class="nx">configKeyListener</span><span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">p_sType</span><span class="o">,</span> <span class="nx">p_aArgs</span><span class="o">)</span> <span class="o">{</span>

		<span class="k">var</span> <span class="nx">oKeyData</span> <span class="o">=</span> <span class="nx">p_aArgs</span><span class="o">[</span><span class="m">0</span><span class="o">],</span>
			<span class="nx">oMenuItem</span> <span class="o">=</span> <span class="k">this</span><span class="o">,</span>
			<span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">parent</span><span class="o">;</span>

		<span class="k">if</span> <span class="o">(</span><span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_keyData</span><span class="o">)</span> <span class="o">{</span>

			<span class="c">//	Unsubscribe from the &quot;show&quot; event in case the keylistener </span>
<span class="c"></span>			<span class="c">//	config was changed before the Menu was ever made visible.</span>
<span class="c"></span>
			<span class="nx">oMenu</span><span class="o">.</span><span class="nx">unsubscribe</span><span class="o">(</span><span class="nx">_SHOW</span><span class="o">,</span> 
					<span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_createKeyListener</span><span class="o">,</span> <span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_keyData</span><span class="o">);</span>

			<span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_keyData</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>					
					
		<span class="o">}</span>


		<span class="c">//	Tear down for the previous value of the &quot;keylistener&quot; property</span>
<span class="c"></span>
		<span class="k">if</span> <span class="o">(</span><span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_keyListener</span><span class="o">)</span> <span class="o">{</span>

			<span class="nx">oMenu</span><span class="o">.</span><span class="nx">unsubscribe</span><span class="o">(</span><span class="nx">_SHOW</span><span class="o">,</span> <span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_keyListener</span><span class="o">.</span><span class="nx">enable</span><span class="o">);</span>
			<span class="nx">oMenu</span><span class="o">.</span><span class="nx">unsubscribe</span><span class="o">(</span><span class="nx">_HIDE</span><span class="o">,</span> <span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_keyListener</span><span class="o">.</span><span class="nx">disable</span><span class="o">);</span>

			<span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_keyListener</span><span class="o">.</span><span class="nx">disable</span><span class="o">();</span>
			<span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_keyListener</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

		<span class="o">}</span>


    	<span class="k">if</span> <span class="o">(</span><span class="nx">oKeyData</span><span class="o">)</span> <span class="o">{</span>
	
			<span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_keyData</span> <span class="o">=</span> <span class="nx">oKeyData</span><span class="o">;</span>

			<span class="c">//	Defer the creation of the KeyListener instance until the </span>
<span class="c"></span>			<span class="c">//	parent Menu is visible.  This is necessary since the </span>
<span class="c"></span>			<span class="c">//	KeyListener instance needs to be bound to the document the </span>
<span class="c"></span>			<span class="c">//	Menu has been rendered into.  Deferring creation of the </span>
<span class="c"></span>			<span class="c">//	KeyListener instance also improves performance.</span>
<span class="c"></span>
			<span class="nx">oMenu</span><span class="o">.</span><span class="nx">subscribe</span><span class="o">(</span><span class="nx">_SHOW</span><span class="o">,</span> <span class="nx">oMenuItem</span><span class="o">.</span><span class="nx">_createKeyListener</span><span class="o">,</span> 
				<span class="nx">oKeyData</span><span class="o">,</span> <span class="nx">oMenuItem</span><span class="o">);</span>
		<span class="o">}</span>
    
    <span class="o">},</span>


    <span class="c">// Public methods</span>
<span class="c"></span>

	<span class="c">/**</span>
<span class="c">    * @method initDefaultConfig</span>
<span class="c">	* @description Initializes an item&#39;s configurable properties.</span>
<span class="c">	*/</span>
	<span class="nx">initDefaultConfig</span> <span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">oConfig</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">;</span>


        <span class="c">// Define the configuration attributes</span>
<span class="c"></span>
        <span class="c">/**</span>
<span class="c">        * @config text</span>
<span class="c">        * @description String specifying the text label for the menu item.  </span>
<span class="c">        * When building a menu from existing HTML the value of this property</span>
<span class="c">        * will be interpreted from the menu&#39;s markup.</span>
<span class="c">        * @default &quot;&quot;</span>
<span class="c">        * @type String</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">TEXT_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span> 
            <span class="o">{</span> 
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configText</span><span class="o">,</span> 
                <span class="nx">value</span><span class="o">:</span> <span class="nx">TEXT_CONFIG</span><span class="o">.</span><span class="nx">value</span><span class="o">,</span> 
                <span class="nx">validator</span><span class="o">:</span> <span class="nx">TEXT_CONFIG</span><span class="o">.</span><span class="nx">validator</span><span class="o">,</span> 
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">TEXT_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span> 
            <span class="o">}</span>
        <span class="o">);</span>
        

        <span class="c">/**</span>
<span class="c">        * @config helptext</span>
<span class="c">        * @description String specifying additional instructional text to </span>
<span class="c">        * accompany the text for the menu item.</span>
<span class="c">        * @deprecated Use &quot;text&quot; configuration property to add help text markup.  </span>
<span class="c">        * For example: &lt;code&gt;oMenuItem.cfg.setProperty(&quot;text&quot;, &quot;Copy &amp;#60;em </span>
<span class="c">        * class=\&quot;helptext\&quot;&amp;#62;Ctrl + C&amp;#60;/em&amp;#62;&quot;);&lt;/code&gt;</span>
<span class="c">        * @default null</span>
<span class="c">        * @type String|&lt;a href=&quot;http://www.w3.org/TR/</span>
<span class="c">        * 2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-58190037&quot;&gt;</span>
<span class="c">        * HTMLElement&lt;/a&gt;</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">HELP_TEXT_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span>
            <span class="o">{</span>
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configHelpText</span><span class="o">,</span> 
                <span class="nx">supercedes</span><span class="o">:</span> <span class="nx">HELP_TEXT_CONFIG</span><span class="o">.</span><span class="nx">supercedes</span><span class="o">,</span>
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">HELP_TEXT_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span> 
            <span class="o">}</span>
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config url</span>
<span class="c">        * @description String specifying the URL for the menu item&#39;s anchor&#39;s </span>
<span class="c">        * &quot;href&quot; attribute.  When building a menu from existing HTML the value </span>
<span class="c">        * of this property will be interpreted from the menu&#39;s markup.</span>
<span class="c">        * @default &quot;#&quot;</span>
<span class="c">        * @type String</span>
<span class="c">        */</span>        
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">URL_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span> 
            <span class="o">{</span>
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configURL</span><span class="o">,</span> 
                <span class="nx">value</span><span class="o">:</span> <span class="nx">URL_CONFIG</span><span class="o">.</span><span class="nx">value</span><span class="o">,</span> 
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">URL_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span>
            <span class="o">}</span>
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config target</span>
<span class="c">        * @description String specifying the value for the &quot;target&quot; attribute </span>
<span class="c">        * of the menu item&#39;s anchor element. &lt;strong&gt;Specifying a target will </span>
<span class="c">        * require the user to click directly on the menu item&#39;s anchor node in</span>
<span class="c">        * order to cause the browser to navigate to the specified URL.&lt;/strong&gt; </span>
<span class="c">        * When building a menu from existing HTML the value of this property </span>
<span class="c">        * will be interpreted from the menu&#39;s markup.</span>
<span class="c">        * @default null</span>
<span class="c">        * @type String</span>
<span class="c">        */</span>        
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">TARGET_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span> 
            <span class="o">{</span>
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configTarget</span><span class="o">,</span> 
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">TARGET_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span>
            <span class="o">}</span>
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config emphasis</span>
<span class="c">        * @description Boolean indicating if the text of the menu item will be </span>
<span class="c">        * rendered with emphasis.</span>
<span class="c">        * @deprecated Use the &quot;text&quot; configuration property to add emphasis.  </span>
<span class="c">        * For example: &lt;code&gt;oMenuItem.cfg.setProperty(&quot;text&quot;, &quot;&amp;#60;em&amp;#62;Some </span>
<span class="c">        * Text&amp;#60;/em&amp;#62;&quot;);&lt;/code&gt;</span>
<span class="c">        * @default false</span>
<span class="c">        * @type Boolean</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">EMPHASIS_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span> 
            <span class="o">{</span> 
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configEmphasis</span><span class="o">,</span> 
                <span class="nx">value</span><span class="o">:</span> <span class="nx">EMPHASIS_CONFIG</span><span class="o">.</span><span class="nx">value</span><span class="o">,</span> 
                <span class="nx">validator</span><span class="o">:</span> <span class="nx">EMPHASIS_CONFIG</span><span class="o">.</span><span class="nx">validator</span><span class="o">,</span> 
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">EMPHASIS_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span><span class="o">,</span>
                <span class="nx">supercedes</span><span class="o">:</span> <span class="nx">EMPHASIS_CONFIG</span><span class="o">.</span><span class="nx">supercedes</span>
            <span class="o">}</span>
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config strongemphasis</span>
<span class="c">        * @description Boolean indicating if the text of the menu item will be </span>
<span class="c">        * rendered with strong emphasis.</span>
<span class="c">        * @deprecated Use the &quot;text&quot; configuration property to add strong emphasis.  </span>
<span class="c">        * For example: &lt;code&gt;oMenuItem.cfg.setProperty(&quot;text&quot;, &quot;&amp;#60;strong&amp;#62; </span>
<span class="c">        * Some Text&amp;#60;/strong&amp;#62;&quot;);&lt;/code&gt;</span>
<span class="c">        * @default false</span>
<span class="c">        * @type Boolean</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">STRONG_EMPHASIS_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span>
            <span class="o">{</span>
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configStrongEmphasis</span><span class="o">,</span>
                <span class="nx">value</span><span class="o">:</span> <span class="nx">STRONG_EMPHASIS_CONFIG</span><span class="o">.</span><span class="nx">value</span><span class="o">,</span>
                <span class="nx">validator</span><span class="o">:</span> <span class="nx">STRONG_EMPHASIS_CONFIG</span><span class="o">.</span><span class="nx">validator</span><span class="o">,</span>
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">STRONG_EMPHASIS_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span><span class="o">,</span>
                <span class="nx">supercedes</span><span class="o">:</span> <span class="nx">STRONG_EMPHASIS_CONFIG</span><span class="o">.</span><span class="nx">supercedes</span>
            <span class="o">}</span>
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config checked</span>
<span class="c">        * @description Boolean indicating if the menu item should be rendered </span>
<span class="c">        * with a checkmark.</span>
<span class="c">        * @default false</span>
<span class="c">        * @type Boolean</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">CHECKED_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span> 
            <span class="o">{</span>
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configChecked</span><span class="o">,</span> 
                <span class="nx">value</span><span class="o">:</span> <span class="nx">CHECKED_CONFIG</span><span class="o">.</span><span class="nx">value</span><span class="o">,</span> 
                <span class="nx">validator</span><span class="o">:</span> <span class="nx">CHECKED_CONFIG</span><span class="o">.</span><span class="nx">validator</span><span class="o">,</span> 
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">CHECKED_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span><span class="o">,</span>
                <span class="nx">supercedes</span><span class="o">:</span> <span class="nx">CHECKED_CONFIG</span><span class="o">.</span><span class="nx">supercedes</span>
            <span class="o">}</span> 
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config disabled</span>
<span class="c">        * @description Boolean indicating if the menu item should be disabled.  </span>
<span class="c">        * (Disabled menu items are  dimmed and will not respond to user input </span>
<span class="c">        * or fire events.)</span>
<span class="c">        * @default false</span>
<span class="c">        * @type Boolean</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">DISABLED_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span>
            <span class="o">{</span>
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configDisabled</span><span class="o">,</span>
                <span class="nx">value</span><span class="o">:</span> <span class="nx">DISABLED_CONFIG</span><span class="o">.</span><span class="nx">value</span><span class="o">,</span>
                <span class="nx">validator</span><span class="o">:</span> <span class="nx">DISABLED_CONFIG</span><span class="o">.</span><span class="nx">validator</span><span class="o">,</span>
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">DISABLED_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span>
            <span class="o">}</span>
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config selected</span>
<span class="c">        * @description Boolean indicating if the menu item should </span>
<span class="c">        * be highlighted.</span>
<span class="c">        * @default false</span>
<span class="c">        * @type Boolean</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">SELECTED_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span>
            <span class="o">{</span>
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configSelected</span><span class="o">,</span>
                <span class="nx">value</span><span class="o">:</span> <span class="nx">SELECTED_CONFIG</span><span class="o">.</span><span class="nx">value</span><span class="o">,</span>
                <span class="nx">validator</span><span class="o">:</span> <span class="nx">SELECTED_CONFIG</span><span class="o">.</span><span class="nx">validator</span><span class="o">,</span>
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">SELECTED_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span>
            <span class="o">}</span>
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config submenu</span>
<span class="c">        * @description Object specifying the submenu to be appended to the </span>
<span class="c">        * menu item.  The value can be one of the following: &lt;ul&gt;&lt;li&gt;Object </span>
<span class="c">        * specifying a Menu instance.&lt;/li&gt;&lt;li&gt;Object literal specifying the</span>
<span class="c">        * menu to be created.  Format: &lt;code&gt;{ id: [menu id], itemdata: </span>
<span class="c">        * [&lt;a href=&quot;YAHOO.widget.Menu.html#itemData&quot;&gt;array of values for </span>
<span class="c">        * items&lt;/a&gt;] }&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;String specifying the id attribute </span>
<span class="c">        * of the &lt;code&gt;&amp;#60;div&amp;#62;&lt;/code&gt; element of the menu.&lt;/li&gt;&lt;li&gt;</span>
<span class="c">        * Object specifying the &lt;code&gt;&amp;#60;div&amp;#62;&lt;/code&gt; element of the </span>
<span class="c">        * menu.&lt;/li&gt;&lt;/ul&gt;</span>
<span class="c">        * @default null</span>
<span class="c">        * @type Menu|String|Object|&lt;a href=&quot;http://www.w3.org/TR/2000/</span>
<span class="c">        * WD-DOM-Level-1-20000929/level-one-html.html#ID-58190037&quot;&gt;</span>
<span class="c">        * HTMLElement&lt;/a&gt;</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">SUBMENU_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span> 
            <span class="o">{</span>
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configSubmenu</span><span class="o">,</span> 
                <span class="nx">supercedes</span><span class="o">:</span> <span class="nx">SUBMENU_CONFIG</span><span class="o">.</span><span class="nx">supercedes</span><span class="o">,</span>
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">SUBMENU_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span>
            <span class="o">}</span>
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config onclick</span>
<span class="c">        * @description Object literal representing the code to be executed when </span>
<span class="c">        * the item is clicked.  Format:&lt;br&gt; &lt;code&gt; {&lt;br&gt; </span>
<span class="c">        * &lt;strong&gt;fn:&lt;/strong&gt; Function,   &amp;#47;&amp;#47; The handler to call when </span>
<span class="c">        * the event fires.&lt;br&gt; &lt;strong&gt;obj:&lt;/strong&gt; Object, &amp;#47;&amp;#47; An </span>
<span class="c">        * object to  pass back to the handler.&lt;br&gt; &lt;strong&gt;scope:&lt;/strong&gt; </span>
<span class="c">        * Object &amp;#47;&amp;#47; The object to use for the scope of the handler.</span>
<span class="c">        * &lt;br&gt; } &lt;/code&gt;</span>
<span class="c">        * @type Object</span>
<span class="c">        * @default null</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">ONCLICK_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span> 
            <span class="o">{</span>
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configOnClick</span><span class="o">,</span> 
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">ONCLICK_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span> 
            <span class="o">}</span>
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config classname</span>
<span class="c">        * @description CSS class to be applied to the menu item&#39;s root </span>
<span class="c">        * &lt;code&gt;&amp;#60;li&amp;#62;&lt;/code&gt; element.  The specified class(es) are </span>
<span class="c">        * appended in addition to the default class as specified by the menu </span>
<span class="c">        * item&#39;s CSS_CLASS_NAME constant.</span>
<span class="c">        * @default null</span>
<span class="c">        * @type String</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">CLASS_NAME_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span> 
            <span class="o">{</span> 
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configClassName</span><span class="o">,</span>
                <span class="nx">value</span><span class="o">:</span> <span class="nx">CLASS_NAME_CONFIG</span><span class="o">.</span><span class="nx">value</span><span class="o">,</span> 
                <span class="nx">validator</span><span class="o">:</span> <span class="nx">CLASS_NAME_CONFIG</span><span class="o">.</span><span class="nx">validator</span><span class="o">,</span>
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">CLASS_NAME_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span> 
            <span class="o">}</span>
        <span class="o">);</span>


        <span class="c">/**</span>
<span class="c">        * @config keylistener</span>
<span class="c">        * @description Object literal representing the key(s) that can be used </span>
<span class="c"> 		* to trigger the MenuItem&#39;s &quot;click&quot; event.  Possible attributes are </span>
<span class="c">		* shift (boolean), alt (boolean), ctrl (boolean) and keys (either an int </span>
<span class="c">		* or an array of ints representing keycodes).</span>
<span class="c">        * @default null</span>
<span class="c">        * @type Object</span>
<span class="c">        */</span>
        <span class="nx">oConfig</span><span class="o">.</span><span class="nx">addProperty</span><span class="o">(</span>
            <span class="nx">KEY_LISTENER_CONFIG</span><span class="o">.</span><span class="nx">key</span><span class="o">,</span> 
            <span class="o">{</span> 
                <span class="nx">handler</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">configKeyListener</span><span class="o">,</span>
                <span class="nx">value</span><span class="o">:</span> <span class="nx">KEY_LISTENER_CONFIG</span><span class="o">.</span><span class="nx">value</span><span class="o">,</span> 
                <span class="nx">suppressEvent</span><span class="o">:</span> <span class="nx">KEY_LISTENER_CONFIG</span><span class="o">.</span><span class="nx">suppressEvent</span> 
            <span class="o">}</span>
        <span class="o">);</span>

	<span class="o">},</span>

    <span class="c">/**</span>
<span class="c">    * @method getNextSibling</span>
<span class="c">    * @description Finds the menu item&#39;s next sibling.</span>
<span class="c">    * @return YAHOO.widget.MenuItem</span>
<span class="c">    */</span>
	<span class="nx">getNextSibling</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>
	
		<span class="k">var</span> <span class="nx">isUL</span> <span class="o">=</span> <span class="k">function</span> <span class="o">(</span><span class="nx">el</span><span class="o">)</span> <span class="o">{</span>
				<span class="k">return</span> <span class="o">(</span><span class="nx">el</span><span class="o">.</span><span class="nx">nodeName</span><span class="o">.</span><span class="nx">toLowerCase</span><span class="o">()</span> <span class="o">===</span> <span class="s2">&quot;ul&quot;</span><span class="o">);</span>
			<span class="o">},</span>
	
			<span class="nx">menuitemEl</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">,</span>
			<span class="nx">next</span> <span class="o">=</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">getNextSibling</span><span class="o">(</span><span class="nx">menuitemEl</span><span class="o">),</span>
			<span class="nx">parent</span><span class="o">,</span>
			<span class="nx">sibling</span><span class="o">,</span>
			<span class="nx">list</span><span class="o">;</span>
		
		<span class="k">if</span> <span class="o">(!</span><span class="nx">next</span><span class="o">)</span> <span class="o">{</span>
			
			<span class="nx">parent</span> <span class="o">=</span> <span class="nx">menuitemEl</span><span class="o">.</span><span class="nx">parentNode</span><span class="o">;</span>
			<span class="nx">sibling</span> <span class="o">=</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">getNextSiblingBy</span><span class="o">(</span><span class="nx">parent</span><span class="o">,</span> <span class="nx">isUL</span><span class="o">);</span>
			
			<span class="k">if</span> <span class="o">(</span><span class="nx">sibling</span><span class="o">)</span> <span class="o">{</span>
				<span class="nx">list</span> <span class="o">=</span> <span class="nx">sibling</span><span class="o">;</span>
			<span class="o">}</span>
			<span class="k">else</span> <span class="o">{</span>
				<span class="nx">list</span> <span class="o">=</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">getFirstChildBy</span><span class="o">(</span><span class="nx">parent</span><span class="o">.</span><span class="nx">parentNode</span><span class="o">,</span> <span class="nx">isUL</span><span class="o">);</span>
			<span class="o">}</span>
			
			<span class="nx">next</span> <span class="o">=</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">getFirstChild</span><span class="o">(</span><span class="nx">list</span><span class="o">);</span>
			
		<span class="o">}</span>

		<span class="k">return</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">MenuManager</span><span class="o">.</span><span class="nx">getMenuItem</span><span class="o">(</span><span class="nx">next</span><span class="o">.</span><span class="nx">id</span><span class="o">);</span>

	<span class="o">},</span>

    <span class="c">/**</span>
<span class="c">    * @method getNextEnabledSibling</span>
<span class="c">    * @description Finds the menu item&#39;s next enabled sibling.</span>
<span class="c">    * @return YAHOO.widget.MenuItem</span>
<span class="c">    */</span>
	<span class="nx">getNextEnabledSibling</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>
		
		<span class="k">var</span> <span class="nx">next</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getNextSibling</span><span class="o">();</span>
		
        <span class="k">return</span> <span class="o">(</span><span class="nx">next</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">)</span> <span class="o">||</span> <span class="nx">next</span><span class="o">.</span><span class="nx">element</span><span class="o">.</span><span class="nx">style</span><span class="o">.</span><span class="nx">display</span> <span class="o">==</span> <span class="nx">_NONE</span><span class="o">)</span> <span class="o">?</span> <span class="nx">next</span><span class="o">.</span><span class="nx">getNextEnabledSibling</span><span class="o">()</span> <span class="o">:</span> <span class="nx">next</span><span class="o">;</span>
		
	<span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method getPreviousSibling</span>
<span class="c">    * @description Finds the menu item&#39;s previous sibling.</span>
<span class="c">    * @return {YAHOO.widget.MenuItem}</span>
<span class="c">    */</span>	
	<span class="nx">getPreviousSibling</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

		<span class="k">var</span> <span class="nx">isUL</span> <span class="o">=</span> <span class="k">function</span> <span class="o">(</span><span class="nx">el</span><span class="o">)</span> <span class="o">{</span>
				<span class="k">return</span> <span class="o">(</span><span class="nx">el</span><span class="o">.</span><span class="nx">nodeName</span><span class="o">.</span><span class="nx">toLowerCase</span><span class="o">()</span> <span class="o">===</span> <span class="s2">&quot;ul&quot;</span><span class="o">);</span>
			<span class="o">},</span>

			<span class="nx">menuitemEl</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">,</span>
			<span class="nx">next</span> <span class="o">=</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">getPreviousSibling</span><span class="o">(</span><span class="nx">menuitemEl</span><span class="o">),</span>
			<span class="nx">parent</span><span class="o">,</span>
			<span class="nx">sibling</span><span class="o">,</span>
			<span class="nx">list</span><span class="o">;</span>
		
		<span class="k">if</span> <span class="o">(!</span><span class="nx">next</span><span class="o">)</span> <span class="o">{</span>
			
			<span class="nx">parent</span> <span class="o">=</span> <span class="nx">menuitemEl</span><span class="o">.</span><span class="nx">parentNode</span><span class="o">;</span>
			<span class="nx">sibling</span> <span class="o">=</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">getPreviousSiblingBy</span><span class="o">(</span><span class="nx">parent</span><span class="o">,</span> <span class="nx">isUL</span><span class="o">);</span>
			
			<span class="k">if</span> <span class="o">(</span><span class="nx">sibling</span><span class="o">)</span> <span class="o">{</span>
				<span class="nx">list</span> <span class="o">=</span> <span class="nx">sibling</span><span class="o">;</span>
			<span class="o">}</span>
			<span class="k">else</span> <span class="o">{</span>
				<span class="nx">list</span> <span class="o">=</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">getLastChildBy</span><span class="o">(</span><span class="nx">parent</span><span class="o">.</span><span class="nx">parentNode</span><span class="o">,</span> <span class="nx">isUL</span><span class="o">);</span>
			<span class="o">}</span>
			
			<span class="nx">next</span> <span class="o">=</span> <span class="nx">Dom</span><span class="o">.</span><span class="nx">getLastChild</span><span class="o">(</span><span class="nx">list</span><span class="o">);</span>
			
		<span class="o">}</span>

		<span class="k">return</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">MenuManager</span><span class="o">.</span><span class="nx">getMenuItem</span><span class="o">(</span><span class="nx">next</span><span class="o">.</span><span class="nx">id</span><span class="o">);</span>
		
	<span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method getPreviousEnabledSibling</span>
<span class="c">    * @description Finds the menu item&#39;s previous enabled sibling.</span>
<span class="c">    * @return {YAHOO.widget.MenuItem}</span>
<span class="c">    */</span>
	<span class="nx">getPreviousEnabledSibling</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>
		
		<span class="k">var</span> <span class="nx">next</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getPreviousSibling</span><span class="o">();</span>
		
        <span class="k">return</span> <span class="o">(</span><span class="nx">next</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">)</span> <span class="o">||</span> <span class="nx">next</span><span class="o">.</span><span class="nx">element</span><span class="o">.</span><span class="nx">style</span><span class="o">.</span><span class="nx">display</span> <span class="o">==</span> <span class="nx">_NONE</span><span class="o">)</span> <span class="o">?</span> <span class="nx">next</span><span class="o">.</span><span class="nx">getPreviousEnabledSibling</span><span class="o">()</span> <span class="o">:</span> <span class="nx">next</span><span class="o">;</span>
		
	<span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method focus</span>
<span class="c">    * @description Causes the menu item to receive the focus and fires the </span>
<span class="c">    * focus event.</span>
<span class="c">    */</span>
    <span class="nx">focus</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">oParent</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">parent</span><span class="o">,</span>
            <span class="nx">oAnchor</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span><span class="o">,</span>
            <span class="nx">oActiveItem</span> <span class="o">=</span> <span class="nx">oParent</span><span class="o">.</span><span class="nx">activeItem</span><span class="o">;</span>


        <span class="k">function</span> <span class="nx">setFocus</span><span class="o">()</span> <span class="o">{</span>

            <span class="k">try</span> <span class="o">{</span>

                <span class="k">if</span> <span class="o">(!(</span><span class="nx">UA</span><span class="o">.</span><span class="nx">ie</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nb">document</span><span class="o">.</span><span class="nx">hasFocus</span><span class="o">()))</span> <span class="o">{</span>
                
					<span class="k">if</span> <span class="o">(</span><span class="nx">oActiveItem</span><span class="o">)</span> <span class="o">{</span>
		
						<span class="nx">oActiveItem</span><span class="o">.</span><span class="nx">blurEvent</span><span class="o">.</span><span class="nx">fire</span><span class="o">();</span>
		
					<span class="o">}</span>
	
					<span class="nx">oAnchor</span><span class="o">.</span><span class="nx">focus</span><span class="o">();</span>
					
					<span class="k">this</span><span class="o">.</span><span class="nx">focusEvent</span><span class="o">.</span><span class="nx">fire</span><span class="o">();</span>
                
                <span class="o">}</span>

            <span class="o">}</span>
            <span class="k">catch</span><span class="o">(</span><span class="nx">e</span><span class="o">)</span> <span class="o">{</span>
            
            <span class="o">}</span>

        <span class="o">}</span>


        <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">)</span> <span class="o">&amp;&amp;</span> <span class="nx">oParent</span> <span class="o">&amp;&amp;</span> <span class="nx">oParent</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_VISIBLE</span><span class="o">)</span> <span class="o">&amp;&amp;</span> 
            <span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">.</span><span class="nx">style</span><span class="o">.</span><span class="nx">display</span> <span class="o">!=</span> <span class="nx">_NONE</span><span class="o">)</span> <span class="o">{</span>


            <span class="c">/*</span>
<span class="c">                Setting focus via a timer fixes a race condition in Firefox, IE </span>
<span class="c">                and Opera where the browser viewport jumps as it trys to </span>
<span class="c">                position and focus the menu.</span>
<span class="c">            */</span>

            <span class="nx">Lang</span><span class="o">.</span><span class="nx">later</span><span class="o">(</span><span class="m">0</span><span class="o">,</span> <span class="k">this</span><span class="o">,</span> <span class="nx">setFocus</span><span class="o">);</span>

        <span class="o">}</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method blur</span>
<span class="c">    * @description Causes the menu item to lose focus and fires the </span>
<span class="c">    * blur event.</span>
<span class="c">    */</span>    
    <span class="nx">blur</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">oParent</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">parent</span><span class="o">;</span>

        <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_DISABLED</span><span class="o">)</span> <span class="o">&amp;&amp;</span> <span class="nx">oParent</span> <span class="o">&amp;&amp;</span> <span class="nx">oParent</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_VISIBLE</span><span class="o">))</span> <span class="o">{</span>

            <span class="nx">Lang</span><span class="o">.</span><span class="nx">later</span><span class="o">(</span><span class="m">0</span><span class="o">,</span> <span class="k">this</span><span class="o">,</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

                <span class="k">try</span> <span class="o">{</span>
    
                    <span class="k">this</span><span class="o">.</span><span class="nx">_oAnchor</span><span class="o">.</span><span class="nx">blur</span><span class="o">();</span>
                    <span class="k">this</span><span class="o">.</span><span class="nx">blurEvent</span><span class="o">.</span><span class="nx">fire</span><span class="o">();</span>    

                <span class="o">}</span> 
                <span class="k">catch</span> <span class="o">(</span><span class="nx">e</span><span class="o">)</span> <span class="o">{</span>
                
                <span class="o">}</span>
                
            <span class="o">},</span> <span class="m">0</span><span class="o">);</span>

        <span class="o">}</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method hasFocus</span>
<span class="c">    * @description Returns a boolean indicating whether or not the menu item</span>
<span class="c">    * has focus.</span>
<span class="c">    * @return {Boolean}</span>
<span class="c">    */</span>
    <span class="nx">hasFocus</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>
    
        <span class="k">return</span> <span class="o">(</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">MenuManager</span><span class="o">.</span><span class="nx">getFocusedMenuItem</span><span class="o">()</span> <span class="o">==</span> <span class="k">this</span><span class="o">);</span>
    
    <span class="o">},</span>


	<span class="c">/**</span>
<span class="c">    * @method destroy</span>
<span class="c">	* @description Removes the menu item&#39;s &lt;code&gt;&amp;#60;li&amp;#62;&lt;/code&gt; element </span>
<span class="c">	* from its parent &lt;code&gt;&amp;#60;ul&amp;#62;&lt;/code&gt; element.</span>
<span class="c">	*/</span>
    <span class="nx">destroy</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">oEl</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">element</span><span class="o">,</span>
            <span class="nx">oSubmenu</span><span class="o">,</span>
            <span class="nx">oParentNode</span><span class="o">,</span>
            <span class="nx">aEventData</span><span class="o">,</span>
            <span class="nx">i</span><span class="o">;</span>


        <span class="k">if</span> <span class="o">(</span><span class="nx">oEl</span><span class="o">)</span> <span class="o">{</span>


            <span class="c">// If the item has a submenu, destroy it first</span>
<span class="c"></span>
            <span class="nx">oSubmenu</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">getProperty</span><span class="o">(</span><span class="nx">_SUBMENU</span><span class="o">);</span>

            <span class="k">if</span> <span class="o">(</span><span class="nx">oSubmenu</span><span class="o">)</span> <span class="o">{</span>
            
                <span class="nx">oSubmenu</span><span class="o">.</span><span class="nx">destroy</span><span class="o">();</span>
            
            <span class="o">}</span>


            <span class="c">// Remove the element from the parent node</span>
<span class="c"></span>
            <span class="nx">oParentNode</span> <span class="o">=</span> <span class="nx">oEl</span><span class="o">.</span><span class="nx">parentNode</span><span class="o">;</span>

            <span class="k">if</span> <span class="o">(</span><span class="nx">oParentNode</span><span class="o">)</span> <span class="o">{</span>

                <span class="nx">oParentNode</span><span class="o">.</span><span class="nx">removeChild</span><span class="o">(</span><span class="nx">oEl</span><span class="o">);</span>

                <span class="k">this</span><span class="o">.</span><span class="nx">destroyEvent</span><span class="o">.</span><span class="nx">fire</span><span class="o">();</span>

            <span class="o">}</span>


            <span class="c">// Remove CustomEvent listeners</span>
<span class="c"></span>
			<span class="nx">i</span> <span class="o">=</span> <span class="nx">EVENT_TYPES</span><span class="o">.</span><span class="nx">length</span> <span class="o">-</span> <span class="m">1</span><span class="o">;</span>

			<span class="k">do</span> <span class="o">{</span>

				<span class="nx">aEventData</span> <span class="o">=</span> <span class="nx">EVENT_TYPES</span><span class="o">[</span><span class="nx">i</span><span class="o">];</span>
				
				<span class="k">this</span><span class="o">[</span><span class="nx">aEventData</span><span class="o">[</span><span class="m">0</span><span class="o">]].</span><span class="nx">unsubscribeAll</span><span class="o">();</span>

			<span class="o">}</span>
			<span class="k">while</span> <span class="o">(</span><span class="nx">i</span><span class="o">--);</span>
            
            
            <span class="k">this</span><span class="o">.</span><span class="nx">cfg</span><span class="o">.</span><span class="nx">configChangedEvent</span><span class="o">.</span><span class="nx">unsubscribeAll</span><span class="o">();</span>

        <span class="o">}</span>

    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">    * @method toString</span>
<span class="c">    * @description Returns a string representing the menu item.</span>
<span class="c">    * @return {String}</span>
<span class="c">    */</span>
    <span class="nx">toString</span><span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">sReturnVal</span> <span class="o">=</span> <span class="nx">_MENUITEM</span><span class="o">,</span>
            <span class="nx">sId</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">id</span><span class="o">;</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">sId</span><span class="o">)</span> <span class="o">{</span>
    
            <span class="nx">sReturnVal</span> <span class="o">+=</span> <span class="o">(</span><span class="nx">_SPACE</span> <span class="o">+</span> <span class="nx">sId</span><span class="o">);</span>
        
        <span class="o">}</span>

        <span class="k">return</span> <span class="nx">sReturnVal</span><span class="o">;</span>
    
    <span class="o">}</span>

<span class="o">};</span>

<span class="nx">Lang</span><span class="o">.</span><span class="nx">augmentProto</span><span class="o">(</span><span class="nx">MenuItem</span><span class="o">,</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">EventProvider</span><span class="o">);</span>

<span class="o">})();</span>
</pre></div>

                    </div>
			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li class=""><a href="module_animation.html" title="animation">animation</a></li>
                                <li class=""><a href="module_autocomplete.html" title="autocomplete">autocomplete</a></li>
                                <li class=""><a href="module_button.html" title="button">button</a></li>
                                <li class=""><a href="module_calendar.html" title="calendar">calendar</a></li>
                                <li class=""><a href="module_carousel.html" title="carousel">carousel</a></li>
                                <li class=""><a href="module_charts.html" title="charts">charts</a></li>
                                <li class=""><a href="module_colorpicker.html" title="colorpicker">colorpicker</a></li>
                                <li class=""><a href="module_connection.html" title="connection">connection</a></li>
                                <li class=""><a href="module_container.html" title="container">container</a></li>
                                <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
                                <li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
                                <li class=""><a href="module_datatable.html" title="datatable">datatable</a></li>
                                <li class=""><a href="module_datemath.html" title="datemath">datemath</a></li>
                                <li class=""><a href="module_dom.html" title="dom">dom</a></li>
                                <li class=""><a href="module_dragdrop.html" title="dragdrop">dragdrop</a></li>
                                <li class=""><a href="module_editor.html" title="editor">editor</a></li>
                                <li class=""><a href="module_element.html" title="element">element</a></li>
                                <li class=""><a href="module_element-delegate.html" title="element-delegate">element-delegate</a></li>
                                <li class=""><a href="module_event.html" title="event">event</a></li>
                                <li class=""><a href="module_event-delegate.html" title="event-delegate">event-delegate</a></li>
                                <li class=""><a href="module_event-mouseenter.html" title="event-mouseenter">event-mouseenter</a></li>
                                <li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
                                <li class=""><a href="module_get.html" title="get">get</a></li>
                                <li class=""><a href="module_history.html" title="history">history</a></li>
                                <li class=""><a href="module_imagecropper.html" title="imagecropper">imagecropper</a></li>
                                <li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
                                <li class=""><a href="module_json.html" title="json">json</a></li>
                                <li class=""><a href="module_layout.html" title="layout">layout</a></li>
                                <li class=""><a href="module_logger.html" title="logger">logger</a></li>
                                <li class="selected"><a href="module_menu.html" title="menu">menu</a></li>
                                <li class=""><a href="module_paginator.html" title="paginator">paginator</a></li>
                                <li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
                                <li class=""><a href="module_profilerviewer.html" title="profilerviewer">profilerviewer</a></li>
                                <li class=""><a href="module_progressbar.html" title="progressbar">progressbar</a></li>
                                <li class=""><a href="module_resize.html" title="resize">resize</a></li>
                                <li class=""><a href="module_selector.html" title="selector">selector</a></li>
                                <li class=""><a href="module_slider.html" title="slider">slider</a></li>
                                <li class=""><a href="module_storage.html" title="Storage">Storage</a></li>
                                <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
                                <li class=""><a href="module_swf.html" title="swf">swf</a></li>
                                <li class=""><a href="module_swfdetect.html" title="swfdetect">swfdetect</a></li>
                                <li class=""><a href="module_swfstore.html" title="swfstore">swfstore</a></li>
                                <li class=""><a href="module_tabview.html" title="tabview">tabview</a></li>
                                <li class=""><a href="module_treeview.html" title="treeview">treeview</a></li>
                                <li class=""><a href="module_uploader.html" title="uploader">uploader</a></li>
                                <li class=""><a href="module_yahoo.html" title="yahoo">yahoo</a></li>
                                <li class=""><a href="module_yuiloader.html" title="yuiloader">yuiloader</a></li>
                                <li class=""><a href="module_yuitest.html" title="yuitest">yuitest</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="YAHOO.widget.ContextMenu.html" title="YAHOO.widget.ContextMenu">YAHOO.widget.ContextMenu</a></li>
                                <li class=""><a href="YAHOO.widget.ContextMenuItem.html" title="YAHOO.widget.ContextMenuItem">YAHOO.widget.ContextMenuItem</a></li>
                                <li class=""><a href="YAHOO.widget.Menu.html" title="YAHOO.widget.Menu">YAHOO.widget.Menu</a></li>
                                <li class=""><a href="YAHOO.widget.MenuBar.html" title="YAHOO.widget.MenuBar">YAHOO.widget.MenuBar</a></li>
                                <li class=""><a href="YAHOO.widget.MenuBarItem.html" title="YAHOO.widget.MenuBarItem">YAHOO.widget.MenuBarItem</a></li>
                                <li class=""><a href="YAHOO.widget.MenuItem.html" title="YAHOO.widget.MenuItem">YAHOO.widget.MenuItem</a></li>
                                <li class=""><a href="YAHOO.widget.MenuManager.html" title="YAHOO.widget.MenuManager">YAHOO.widget.MenuManager</a></li>
                        </ul>
                    </div>

                    <div id="fileList" class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class=""><a href="contextmenu.js.html" title="contextmenu.js">contextmenu.js</a></li>
                                <li class=""><a href="contextmenuitem.js.html" title="contextmenuitem.js">contextmenuitem.js</a></li>
                                <li class=""><a href="menu.js.html" title="menu.js">menu.js</a></li>
                                <li class=""><a href="menuariaplugin.js.html" title="menuariaplugin.js">menuariaplugin.js</a></li>
                                <li class=""><a href="menubar.js.html" title="menubar.js">menubar.js</a></li>
                                <li class=""><a href="menubaritem.js.html" title="menubaritem.js">menubaritem.js</a></li>
                                <li class="selected"><a href="menuitem.js.html" title="menuitem.js">menuitem.js</a></li>
                                <li class=""><a href="menumanager.js.html" title="menumanager.js">menumanager.js</a></li>
                        </ul>
                    </div>





            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2009 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">
    ALL_YUI_PROPS = [{"access": "", "host": "YAHOO.widget.Menu", "name": "activeItem", "url": "YAHOO.widget.Menu.html#property_activeItem", "type": "property"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "addClassNameForState", "url": "YAHOO.widget.MenuItem.html#method_addClassNameForState", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "addItem", "url": "YAHOO.widget.Menu.html#method_addItem", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "addItems", "url": "YAHOO.widget.Menu.html#method_addItems", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_addItemToGroup", "url": "YAHOO.widget.Menu.html#method__addItemToGroup", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "addMenu", "url": "YAHOO.widget.MenuManager.html#method_addMenu", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_aGroupTitleElements", "url": "YAHOO.widget.Menu.html#property__aGroupTitleElements", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_aItemGroups", "url": "YAHOO.widget.Menu.html#property__aItemGroups", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_aListElements", "url": "YAHOO.widget.Menu.html#property__aListElements", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "autosubmenudisplay", "url": "YAHOO.widget.Menu.html#config_autosubmenudisplay", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuBar", "name": "autosubmenudisplay", "url": "YAHOO.widget.MenuBar.html#config_autosubmenudisplay", "type": "config"}, {"access": "private", "host": "YAHOO.widget.ContextMenu", "name": "_bCancelled", "url": "YAHOO.widget.ContextMenu.html#property__bCancelled", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_bHandledMouseOutEvent", "url": "YAHOO.widget.Menu.html#property__bHandledMouseOutEvent", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_bHandledMouseOverEvent", "url": "YAHOO.widget.Menu.html#property__bHandledMouseOverEvent", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "blur", "url": "YAHOO.widget.Menu.html#method_blur", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "blur", "url": "YAHOO.widget.MenuItem.html#method_blur", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "blurEvent", "url": "YAHOO.widget.MenuItem.html#event_blurEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "browser", "url": "YAHOO.widget.MenuItem.html#property_browser", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_bStopMouseEventHandlers", "url": "YAHOO.widget.Menu.html#property__bStopMouseEventHandlers", "type": "property"}, {"access": "", "host": "YAHOO.widget.ContextMenu", "name": "cancel", "url": "YAHOO.widget.ContextMenu.html#method_cancel", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_cancelHideDelay", "url": "YAHOO.widget.Menu.html#method__cancelHideDelay", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_cancelShowDelay", "url": "YAHOO.widget.Menu.html#method__cancelShowDelay", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "checked", "url": "YAHOO.widget.MenuItem.html#config_checked", "type": "config"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "checkPosition", "url": "YAHOO.widget.Menu.html#method_checkPosition", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuBar", "name": "checkPosition", "url": "YAHOO.widget.MenuBar.html#method_checkPosition", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "classname", "url": "YAHOO.widget.Menu.html#config_classname", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "classname", "url": "YAHOO.widget.MenuItem.html#config_classname", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "clearActiveItem", "url": "YAHOO.widget.Menu.html#method_clearActiveItem", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "clearContent", "url": "YAHOO.widget.Menu.html#method_clearContent", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_clearSetWidthFlag", "url": "YAHOO.widget.Menu.html#method__clearSetWidthFlag", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "clickEvent", "url": "YAHOO.widget.Menu.html#event_clickEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "clickEvent", "url": "YAHOO.widget.MenuItem.html#event_clickEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "clicktohide", "url": "YAHOO.widget.Menu.html#config_clicktohide", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configChecked", "url": "YAHOO.widget.MenuItem.html#method_configChecked", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "configClassName", "url": "YAHOO.widget.Menu.html#method_configClassName", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configClassName", "url": "YAHOO.widget.MenuItem.html#method_configClassName", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "configContainer", "url": "YAHOO.widget.Menu.html#method_configContainer", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "configDisabled", "url": "YAHOO.widget.Menu.html#method_configDisabled", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configDisabled", "url": "YAHOO.widget.MenuItem.html#method_configDisabled", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configEmphasis", "url": "YAHOO.widget.MenuItem.html#method_configEmphasis", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configHelpText", "url": "YAHOO.widget.MenuItem.html#method_configHelpText", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "configHideDelay", "url": "YAHOO.widget.Menu.html#method_configHideDelay", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "configIframe", "url": "YAHOO.widget.Menu.html#method_configIframe", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configKeyListener", "url": "YAHOO.widget.MenuItem.html#method_configKeyListener", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "configMaxHeight", "url": "YAHOO.widget.Menu.html#method_configMaxHeight", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configOnClick", "url": "YAHOO.widget.MenuItem.html#method_configOnClick", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "configPosition", "url": "YAHOO.widget.Menu.html#method_configPosition", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configSelected", "url": "YAHOO.widget.MenuItem.html#method_configSelected", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "configShadow", "url": "YAHOO.widget.Menu.html#method_configShadow", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configStrongEmphasis", "url": "YAHOO.widget.MenuItem.html#method_configStrongEmphasis", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configSubmenu", "url": "YAHOO.widget.MenuItem.html#method_configSubmenu", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuBar", "name": "configSubmenuToggle", "url": "YAHOO.widget.MenuBar.html#method_configSubmenuToggle", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configTarget", "url": "YAHOO.widget.MenuItem.html#method_configTarget", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configText", "url": "YAHOO.widget.MenuItem.html#method_configText", "type": "method"}, {"access": "", "host": "YAHOO.widget.ContextMenu", "name": "configTrigger", "url": "YAHOO.widget.ContextMenu.html#method_configTrigger", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_configureSubmenu", "url": "YAHOO.widget.Menu.html#method__configureSubmenu", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "configURL", "url": "YAHOO.widget.MenuItem.html#method_configURL", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "configVisible", "url": "YAHOO.widget.Menu.html#method_configVisible", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "constraintoviewport", "url": "YAHOO.widget.Menu.html#config_constraintoviewport", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "constructor", "url": "YAHOO.widget.MenuItem.html#property_constructor", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "container", "url": "YAHOO.widget.Menu.html#config_container", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "context", "url": "YAHOO.widget.Menu.html#config_context", "type": "config"}, {"access": "", "host": "YAHOO.widget.ContextMenu", "name": "contextEventTarget", "url": "YAHOO.widget.ContextMenu.html#property_contextEventTarget", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_createItemGroup", "url": "YAHOO.widget.Menu.html#method__createItemGroup", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "_createKeyListener", "url": "YAHOO.widget.MenuItem.html#method__createKeyListener", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "_createRootNodeStructure", "url": "YAHOO.widget.MenuItem.html#method__createRootNodeStructure", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "CSS_CLASS_NAME", "url": "YAHOO.widget.Menu.html#property_CSS_CLASS_NAME", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuBarItem", "name": "CSS_CLASS_NAME", "url": "YAHOO.widget.MenuBarItem.html#property_CSS_CLASS_NAME", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuBar", "name": "CSS_CLASS_NAME", "url": "YAHOO.widget.MenuBar.html#property_CSS_CLASS_NAME", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "CSS_CLASS_NAME", "url": "YAHOO.widget.MenuItem.html#property_CSS_CLASS_NAME", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuBarItem", "name": "CSS_LABEL_CLASS_NAME", "url": "YAHOO.widget.MenuBarItem.html#property_CSS_LABEL_CLASS_NAME", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "CSS_LABEL_CLASS_NAME", "url": "YAHOO.widget.MenuItem.html#property_CSS_LABEL_CLASS_NAME", "type": "property"}, {"access": "private", "host": "YAHOO.widget.ContextMenu", "name": "DEFAULT_CONFIG", "url": "YAHOO.widget.ContextMenu.html#property_DEFAULT_CONFIG", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "destroy", "url": "YAHOO.widget.Menu.html#method_destroy", "type": "method"}, {"access": "", "host": "YAHOO.widget.ContextMenu", "name": "destroy", "url": "YAHOO.widget.ContextMenu.html#method_destroy", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "destroy", "url": "YAHOO.widget.MenuItem.html#method_destroy", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "destroyEvent", "url": "YAHOO.widget.MenuItem.html#event_destroyEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "disabled", "url": "YAHOO.widget.Menu.html#config_disabled", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "disabled", "url": "YAHOO.widget.MenuItem.html#config_disabled", "type": "config"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_disableScrollFooter", "url": "YAHOO.widget.Menu.html#method__disableScrollFooter", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_disableScrollHeader", "url": "YAHOO.widget.Menu.html#method__disableScrollHeader", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "_dispatchClickEvent", "url": "YAHOO.widget.MenuItem.html#method__dispatchClickEvent", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "effect", "url": "YAHOO.widget.Menu.html#config_effect", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "element", "url": "YAHOO.widget.MenuItem.html#property_element", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "emphasis", "url": "YAHOO.widget.MenuItem.html#config_emphasis", "type": "config"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_enableScrollFooter", "url": "YAHOO.widget.Menu.html#method__enableScrollFooter", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_enableScrollHeader", "url": "YAHOO.widget.Menu.html#method__enableScrollHeader", "type": "method"}, {"access": "private", "host": "YAHOO.widget.ContextMenu", "name": "EVENT_TYPES", "url": "YAHOO.widget.ContextMenu.html#property_EVENT_TYPES", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_execHideDelay", "url": "YAHOO.widget.Menu.html#method__execHideDelay", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_execSubmenuHideDelay", "url": "YAHOO.widget.Menu.html#method__execSubmenuHideDelay", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "fixedcenter", "url": "YAHOO.widget.Menu.html#config_fixedcenter", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "focus", "url": "YAHOO.widget.Menu.html#method_focus", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "focus", "url": "YAHOO.widget.MenuItem.html#method_focus", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "focusEvent", "url": "YAHOO.widget.MenuItem.html#event_focusEvent", "type": "event"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "getClassNameForState", "url": "YAHOO.widget.MenuItem.html#method_getClassNameForState", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_getFirstEnabledItem", "url": "YAHOO.widget.Menu.html#method__getFirstEnabledItem", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "getFocusedMenu", "url": "YAHOO.widget.MenuManager.html#method_getFocusedMenu", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "getFocusedMenuItem", "url": "YAHOO.widget.MenuManager.html#method_getFocusedMenuItem", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "getItem", "url": "YAHOO.widget.Menu.html#method_getItem", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_getItemGroup", "url": "YAHOO.widget.Menu.html#method__getItemGroup", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "getItemGroups", "url": "YAHOO.widget.Menu.html#method_getItemGroups", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "getItems", "url": "YAHOO.widget.Menu.html#method_getItems", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "getMenu", "url": "YAHOO.widget.MenuManager.html#method_getMenu", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "getMenuItem", "url": "YAHOO.widget.MenuManager.html#method_getMenuItem", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "getMenuItemGroup", "url": "YAHOO.widget.MenuManager.html#method_getMenuItemGroup", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuManager", "name": "getMenuRootElement", "url": "YAHOO.widget.MenuManager.html#method_getMenuRootElement", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "getMenus", "url": "YAHOO.widget.MenuManager.html#method_getMenus", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "getNextEnabledSibling", "url": "YAHOO.widget.MenuItem.html#method_getNextEnabledSibling", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "getNextSibling", "url": "YAHOO.widget.MenuItem.html#method_getNextSibling", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "getPreviousEnabledSibling", "url": "YAHOO.widget.MenuItem.html#method_getPreviousEnabledSibling", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "getPreviousSibling", "url": "YAHOO.widget.MenuItem.html#method_getPreviousSibling", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "getRoot", "url": "YAHOO.widget.Menu.html#method_getRoot", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "getSubmenus", "url": "YAHOO.widget.Menu.html#method_getSubmenus", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "getVisible", "url": "YAHOO.widget.MenuManager.html#method_getVisible", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "groupIndex", "url": "YAHOO.widget.MenuItem.html#property_groupIndex", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "GROUP_TITLE_TAG_NAME", "url": "YAHOO.widget.Menu.html#property_GROUP_TITLE_TAG_NAME", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "hasFocus", "url": "YAHOO.widget.Menu.html#method_hasFocus", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "hasFocus", "url": "YAHOO.widget.MenuItem.html#method_hasFocus", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "helptext", "url": "YAHOO.widget.MenuItem.html#config_helptext", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "hidedelay", "url": "YAHOO.widget.Menu.html#config_hidedelay", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "hideVisible", "url": "YAHOO.widget.MenuManager.html#method_hideVisible", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "id", "url": "YAHOO.widget.MenuItem.html#property_id", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "iframe", "url": "YAHOO.widget.Menu.html#config_iframe", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "index", "url": "YAHOO.widget.MenuItem.html#property_index", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "init", "url": "YAHOO.widget.Menu.html#method_init", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuBarItem", "name": "init", "url": "YAHOO.widget.MenuBarItem.html#method_init", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuBar", "name": "init", "url": "YAHOO.widget.MenuBar.html#method_init", "type": "method"}, {"access": "", "host": "YAHOO.widget.ContextMenu", "name": "init", "url": "YAHOO.widget.ContextMenu.html#method_init", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "init", "url": "YAHOO.widget.MenuItem.html#method_init", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "initDefaultConfig", "url": "YAHOO.widget.Menu.html#method_initDefaultConfig", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuBar", "name": "initDefaultConfig", "url": "YAHOO.widget.MenuBar.html#method_initDefaultConfig", "type": "method"}, {"access": "", "host": "YAHOO.widget.ContextMenu", "name": "initDefaultConfig", "url": "YAHOO.widget.ContextMenu.html#method_initDefaultConfig", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "initDefaultConfig", "url": "YAHOO.widget.MenuItem.html#method_initDefaultConfig", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "initEvents", "url": "YAHOO.widget.Menu.html#method_initEvents", "type": "method"}, {"access": "", "host": "YAHOO.widget.ContextMenu", "name": "initEvents", "url": "YAHOO.widget.ContextMenu.html#method_initEvents", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_initSubTree", "url": "YAHOO.widget.Menu.html#method__initSubTree", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "_initSubTree", "url": "YAHOO.widget.MenuItem.html#method__initSubTree", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "insertItem", "url": "YAHOO.widget.Menu.html#method_insertItem", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "itemAddedEvent", "url": "YAHOO.widget.Menu.html#event_itemAddedEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "itemData", "url": "YAHOO.widget.Menu.html#property_itemData", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "itemRemovedEvent", "url": "YAHOO.widget.Menu.html#event_itemRemovedEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "ITEM_TYPE", "url": "YAHOO.widget.Menu.html#property_ITEM_TYPE", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "keepopen", "url": "YAHOO.widget.Menu.html#config_keepopen", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "keyDownEvent", "url": "YAHOO.widget.Menu.html#event_keyDownEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "keyDownEvent", "url": "YAHOO.widget.MenuItem.html#event_keyDownEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "keylistener", "url": "YAHOO.widget.MenuItem.html#config_keylistener", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "keyPressEvent", "url": "YAHOO.widget.Menu.html#event_keyPressEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "keyPressEvent", "url": "YAHOO.widget.MenuItem.html#event_keyPressEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "keyUpEvent", "url": "YAHOO.widget.Menu.html#event_keyUpEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "keyUpEvent", "url": "YAHOO.widget.MenuItem.html#event_keyUpEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "lazyLoad", "url": "YAHOO.widget.Menu.html#property_lazyLoad", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "maxheight", "url": "YAHOO.widget.Menu.html#config_maxheight", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "minscrollheight", "url": "YAHOO.widget.Menu.html#config_minscrollheight", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "mouseDownEvent", "url": "YAHOO.widget.Menu.html#event_mouseDownEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "mouseDownEvent", "url": "YAHOO.widget.MenuItem.html#event_mouseDownEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "mouseOutEvent", "url": "YAHOO.widget.Menu.html#event_mouseOutEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "mouseOutEvent", "url": "YAHOO.widget.MenuItem.html#event_mouseOutEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "mouseOverEvent", "url": "YAHOO.widget.Menu.html#event_mouseOverEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "mouseOverEvent", "url": "YAHOO.widget.MenuItem.html#event_mouseOverEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "mouseUpEvent", "url": "YAHOO.widget.Menu.html#event_mouseUpEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "mouseUpEvent", "url": "YAHOO.widget.MenuItem.html#event_mouseUpEvent", "type": "event"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_nCurrentMouseX", "url": "YAHOO.widget.Menu.html#property__nCurrentMouseX", "type": "property"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "_oAnchor", "url": "YAHOO.widget.MenuItem.html#property__oAnchor", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "OFF_SCREEN_POSITION", "url": "YAHOO.widget.Menu.html#property_OFF_SCREEN_POSITION", "type": "property"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "_oHelpTextEM", "url": "YAHOO.widget.MenuItem.html#property__oHelpTextEM", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onBeforeHide", "url": "YAHOO.widget.Menu.html#method__onBeforeHide", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onBeforeRender", "url": "YAHOO.widget.Menu.html#method__onBeforeRender", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onBeforeShow", "url": "YAHOO.widget.Menu.html#method__onBeforeShow", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_onBlur", "url": "YAHOO.widget.Menu.html#method__onBlur", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_onClick", "url": "YAHOO.widget.Menu.html#method__onClick", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.MenuBar", "name": "_onClick", "url": "YAHOO.widget.MenuBar.html#method__onClick", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "onclick", "url": "YAHOO.widget.MenuItem.html#config_onclick", "type": "config"}, {"access": "private", "host": "YAHOO.widget.MenuManager", "name": "onDOMEvent", "url": "YAHOO.widget.MenuManager.html#method_onDOMEvent", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onHide", "url": "YAHOO.widget.Menu.html#method__onHide", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onInit", "url": "YAHOO.widget.Menu.html#method__onInit", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuManager", "name": "onItemAdded", "url": "YAHOO.widget.MenuManager.html#method_onItemAdded", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onItemAdded", "url": "YAHOO.widget.Menu.html#method__onItemAdded", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuManager", "name": "onItemDestroy", "url": "YAHOO.widget.MenuManager.html#method_onItemDestroy", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_onKeyDown", "url": "YAHOO.widget.Menu.html#method__onKeyDown", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuBar", "name": "_onKeyDown", "url": "YAHOO.widget.MenuBar.html#method__onKeyDown", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_onKeyPress", "url": "YAHOO.widget.Menu.html#method__onKeyPress", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuManager", "name": "onMenuBlur", "url": "YAHOO.widget.MenuManager.html#method_onMenuBlur", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuManager", "name": "onMenuDestroy", "url": "YAHOO.widget.MenuManager.html#method_onMenuDestroy", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuManager", "name": "onMenuFocus", "url": "YAHOO.widget.MenuManager.html#method_onMenuFocus", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onMenuItemConfigChange", "url": "YAHOO.widget.Menu.html#method__onMenuItemConfigChange", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onMenuItemDestroy", "url": "YAHOO.widget.Menu.html#method__onMenuItemDestroy", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuManager", "name": "onMenuVisibleConfigChange", "url": "YAHOO.widget.MenuManager.html#method_onMenuVisibleConfigChange", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_onMouseMove", "url": "YAHOO.widget.Menu.html#method__onMouseMove", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_onMouseOut", "url": "YAHOO.widget.Menu.html#method__onMouseOut", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_onMouseOver", "url": "YAHOO.widget.Menu.html#method__onMouseOver", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onParentMenuConfigChange", "url": "YAHOO.widget.Menu.html#method__onParentMenuConfigChange", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onParentMenuRender", "url": "YAHOO.widget.Menu.html#method__onParentMenuRender", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onRender", "url": "YAHOO.widget.Menu.html#method__onRender", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_onScrollTargetMouseOut", "url": "YAHOO.widget.Menu.html#method__onScrollTargetMouseOut", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_onScrollTargetMouseOver", "url": "YAHOO.widget.Menu.html#method__onScrollTargetMouseOver", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onShow", "url": "YAHOO.widget.Menu.html#method__onShow", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "_onSubmenuBeforeHide", "url": "YAHOO.widget.MenuItem.html#method__onSubmenuBeforeHide", "type": "method"}, {"access": "private", "host": "YAHOO.widget.ContextMenu", "name": "_onTriggerClick", "url": "YAHOO.widget.ContextMenu.html#method__onTriggerClick", "type": "method"}, {"access": "private", "host": "YAHOO.widget.ContextMenu", "name": "_onTriggerContextMenu", "url": "YAHOO.widget.ContextMenu.html#method__onTriggerContextMenu", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_onVisibleChange", "url": "YAHOO.widget.Menu.html#method__onVisibleChange", "type": "method"}, {"access": "protected", "host": "YAHOO.widget.Menu", "name": "_onYChange", "url": "YAHOO.widget.Menu.html#method__onYChange", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "_oOnclickAttributeValue", "url": "YAHOO.widget.MenuItem.html#property__oOnclickAttributeValue", "type": "property"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "_oSubmenu", "url": "YAHOO.widget.MenuItem.html#property__oSubmenu", "type": "property"}, {"access": "private", "host": "YAHOO.widget.ContextMenu", "name": "_oTrigger", "url": "YAHOO.widget.ContextMenu.html#property__oTrigger", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "parent", "url": "YAHOO.widget.Menu.html#property_parent", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "parent", "url": "YAHOO.widget.MenuItem.html#property_parent", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "position", "url": "YAHOO.widget.Menu.html#config_position", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuBar", "name": "position", "url": "YAHOO.widget.MenuBar.html#config_position", "type": "config"}, {"access": "private", "host": "YAHOO.widget.ContextMenu", "name": "position", "url": "YAHOO.widget.ContextMenu.html#method_position", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "positionOffScreen", "url": "YAHOO.widget.Menu.html#method_positionOffScreen", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "preventcontextoverlap", "url": "YAHOO.widget.Menu.html#config_preventcontextoverlap", "type": "config"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "removeClassNameForState", "url": "YAHOO.widget.MenuItem.html#method_removeClassNameForState", "type": "method"}, {"access": "private", "host": "YAHOO.widget.ContextMenu", "name": "_removeEventHandlers", "url": "YAHOO.widget.ContextMenu.html#method__removeEventHandlers", "type": "method"}, {"access": "private", "host": "YAHOO.widget.MenuManager", "name": "removeItem", "url": "YAHOO.widget.MenuManager.html#method_removeItem", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "removeItem", "url": "YAHOO.widget.Menu.html#method_removeItem", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_removeItemFromGroupByIndex", "url": "YAHOO.widget.Menu.html#method__removeItemFromGroupByIndex", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_removeItemFromGroupByValue", "url": "YAHOO.widget.Menu.html#method__removeItemFromGroupByValue", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "removeMenu", "url": "YAHOO.widget.MenuManager.html#method_removeMenu", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_sClassName", "url": "YAHOO.widget.Menu.html#property__sClassName", "type": "property"}, {"access": "private", "host": "YAHOO.widget.MenuItem", "name": "_sClassName", "url": "YAHOO.widget.MenuItem.html#property__sClassName", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "scrollincrement", "url": "YAHOO.widget.Menu.html#config_scrollincrement", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "selected", "url": "YAHOO.widget.MenuItem.html#config_selected", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "setInitialFocus", "url": "YAHOO.widget.Menu.html#method_setInitialFocus", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "setInitialSelection", "url": "YAHOO.widget.Menu.html#method_setInitialSelection", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "setItemGroupTitle", "url": "YAHOO.widget.Menu.html#method_setItemGroupTitle", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_setMaxHeight", "url": "YAHOO.widget.Menu.html#method__setMaxHeight", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_setScrollHeight", "url": "YAHOO.widget.Menu.html#method__setScrollHeight", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "shadow", "url": "YAHOO.widget.Menu.html#config_shadow", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "showdelay", "url": "YAHOO.widget.Menu.html#config_showdelay", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "srcElement", "url": "YAHOO.widget.Menu.html#property_srcElement", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "srcElement", "url": "YAHOO.widget.MenuItem.html#property_srcElement", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "strongemphasis", "url": "YAHOO.widget.MenuItem.html#config_strongemphasis", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "submenu", "url": "YAHOO.widget.MenuItem.html#config_submenu", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "submenualignment", "url": "YAHOO.widget.Menu.html#config_submenualignment", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuBar", "name": "submenualignment", "url": "YAHOO.widget.MenuBar.html#config_submenualignment", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "submenuhidedelay", "url": "YAHOO.widget.Menu.html#config_submenuhidedelay", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuBar", "name": "submenutoggleregion", "url": "YAHOO.widget.MenuBar.html#config_submenutoggleregion", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuBar", "name": "SUBMENU_TOGGLE_REGION_WIDTH", "url": "YAHOO.widget.MenuBar.html#property_SUBMENU_TOGGLE_REGION_WIDTH", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "SUBMENU_TYPE", "url": "YAHOO.widget.MenuItem.html#property_SUBMENU_TYPE", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "subscribe", "url": "YAHOO.widget.Menu.html#method_subscribe", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_subscribeToItemEvents", "url": "YAHOO.widget.Menu.html#method__subscribeToItemEvents", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "target", "url": "YAHOO.widget.MenuItem.html#config_target", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "text", "url": "YAHOO.widget.MenuItem.html#config_text", "type": "config"}, {"access": "", "host": "YAHOO.widget.MenuManager", "name": "toString", "url": "YAHOO.widget.MenuManager.html#method_toString", "type": "method"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "toString", "url": "YAHOO.widget.Menu.html#method_toString", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuBarItem", "name": "toString", "url": "YAHOO.widget.MenuBarItem.html#method_toString", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuBar", "name": "toString", "url": "YAHOO.widget.MenuBar.html#method_toString", "type": "method"}, {"access": "", "host": "YAHOO.widget.ContextMenu", "name": "toString", "url": "YAHOO.widget.ContextMenu.html#method_toString", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "toString", "url": "YAHOO.widget.MenuItem.html#method_toString", "type": "method"}, {"access": "", "host": "YAHOO.widget.ContextMenu", "name": "trigger", "url": "YAHOO.widget.ContextMenu.html#config_trigger", "type": "config"}, {"access": "", "host": "YAHOO.widget.ContextMenu", "name": "triggerContextMenuEvent", "url": "YAHOO.widget.ContextMenu.html#event_triggerContextMenuEvent", "type": "event"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_updateItemProperties", "url": "YAHOO.widget.Menu.html#method__updateItemProperties", "type": "method"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "url", "url": "YAHOO.widget.MenuItem.html#config_url", "type": "config"}, {"access": "private", "host": "YAHOO.widget.Menu", "name": "_useHideDelay", "url": "YAHOO.widget.Menu.html#property__useHideDelay", "type": "property"}, {"access": "", "host": "YAHOO.widget.MenuItem", "name": "value", "url": "YAHOO.widget.MenuItem.html#property_value", "type": "property"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "visible", "url": "YAHOO.widget.Menu.html#config_visible", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "x", "url": "YAHOO.widget.Menu.html#config_x", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "xy", "url": "YAHOO.widget.Menu.html#config_xy", "type": "config"}, {"access": "", "host": "YAHOO.widget.Menu", "name": "y", "url": "YAHOO.widget.Menu.html#config_y", "type": "config"}];
</script>
</body>
</html>
